Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 65 formatting warnings in botany #30122

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content.Server/Botany/Components/SeedComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public sealed partial class SeedComponent : SharedSeedComponent
/// <summary>
/// Name of a base seed prototype that is used if <see cref="Seed"/> is null.
/// </summary>
[DataField("seedId", customTypeSerializer:typeof(PrototypeIdSerializer<SeedPrototype>))]
[DataField("seedId", customTypeSerializer: typeof(PrototypeIdSerializer<SeedPrototype>))]
public string? SeedId;
}
}
8 changes: 4 additions & 4 deletions Content.Server/Botany/Systems/MutationSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
using Robust.Shared.Random;
using Content.Shared.Random;
using Content.Shared.Random.Helpers;
using Content.Shared.Chemistry.Reagent;
using System.Linq;
using Content.Shared.Atmos;
using FastAccessors;

namespace Content.Server.Botany;

Expand Down Expand Up @@ -42,6 +40,7 @@ public void MutateSeed(ref SeedData seed, float severity)
// Add up everything in the bits column and put the number here.
const int totalbits = 275;

#pragma warning disable IDE0055 // disable formatting warnings because this looks more readable
// Tolerances (55)
MutateFloat(ref seed.NutrientConsumption , 0.05f, 1.2f, 5, totalbits, severity);
MutateFloat(ref seed.WaterConsumption , 3f , 9f , 5, totalbits, severity);
Expand Down Expand Up @@ -75,6 +74,7 @@ public void MutateSeed(ref SeedData seed, float severity)
MutateBool(ref seed.TurnIntoKudzu , true , 10, totalbits, severity);
MutateBool(ref seed.CanScream , true , 10, totalbits, severity);
seed.BioluminescentColor = RandomColor(seed.BioluminescentColor, 10, totalbits, severity);
#pragma warning restore IDE0055

// ConstantUpgade (10)
MutateHarvestType(ref seed.HarvestRepeat, 10, totalbits, severity);
Expand Down Expand Up @@ -261,7 +261,7 @@ private void MutateChemicals(ref Dictionary<string, SeedChemQuantity> chemicals,
{
var pick = _randomChems.Pick(_robustRandom);
string chemicalId = pick.reagent;
int amount = _robustRandom.Next(1, ((int)pick.quantity));
int amount = _robustRandom.Next(1, (int)pick.quantity);
SeedChemQuantity seedChemQuantity = new SeedChemQuantity();
if (chemicals.ContainsKey(chemicalId))
{
Expand All @@ -274,7 +274,7 @@ private void MutateChemicals(ref Dictionary<string, SeedChemQuantity> chemicals,
seedChemQuantity.Max = 1 + amount;
seedChemQuantity.Inherent = false;
}
int potencyDivisor = (int) Math.Ceiling(100.0f / seedChemQuantity.Max);
int potencyDivisor = (int)Math.Ceiling(100.0f / seedChemQuantity.Max);
seedChemQuantity.PotencyDivisor = potencyDivisor;
chemicals[chemicalId] = seedChemQuantity;
}
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Botany/Systems/SeedExtractorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ private void OnInteractUsing(EntityUid uid, SeedExtractorComponent seedExtractor
return;
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);
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);

QueueDel(args.Used);
Expand Down
Loading