Rider static analysis (#433)
* Non-accessed local variable * Merge cast and type checks. * StringComparison.Ordinal added for better culture support * Supposed code improvement in launcher. Remove unused code. * Update ExplosionHelper.cs Unintentional change. * Optimized Import * Add Robust.Shared.Utility import where it was deleted * Other random suggestion * Improve my comment
This commit is contained in:
committed by
Pieter-Jan Briers
parent
62b31eee00
commit
b2e2aef78d
@@ -1,14 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.Chat;
|
||||
using Robust.Client.Graphics.Drawing;
|
||||
using Robust.Client.Input;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.Input;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Input;
|
||||
|
||||
namespace Content.Client.Chat
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.Interfaces;
|
||||
using Content.Shared;
|
||||
using Robust.Client;
|
||||
using Robust.Client.Interfaces.Console;
|
||||
using Robust.Client.Interfaces.Graphics.ClientEye;
|
||||
using Robust.Client.Interfaces.Input;
|
||||
|
||||
@@ -225,7 +225,7 @@ namespace Content.Client.Construction
|
||||
PopulateTree(string.IsNullOrWhiteSpace(str) ? null : str.ToLowerInvariant());
|
||||
}
|
||||
|
||||
void OnBuildPressed(Button.ButtonEventArgs args)
|
||||
void OnBuildPressed(BaseButton.ButtonEventArgs args)
|
||||
{
|
||||
var prototype = (ConstructionPrototype) RecipeList.Selected.Metadata;
|
||||
if (prototype == null)
|
||||
@@ -332,7 +332,7 @@ namespace Content.Client.Construction
|
||||
{
|
||||
var found = false;
|
||||
// TODO: don't run ToLowerInvariant() constantly.
|
||||
if (prototype.Name.ToLowerInvariant().IndexOf(searchTerm) != -1)
|
||||
if (prototype.Name.ToLowerInvariant().IndexOf(searchTerm, StringComparison.Ordinal) != -1)
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
@@ -341,7 +341,7 @@ namespace Content.Client.Construction
|
||||
foreach (var keyw in prototype.Keywords.Concat(prototype.CategorySegments))
|
||||
{
|
||||
// TODO: don't run ToLowerInvariant() constantly.
|
||||
if (keyw.ToLowerInvariant().IndexOf(searchTerm) != -1)
|
||||
if (keyw.ToLowerInvariant().IndexOf(searchTerm, StringComparison.Ordinal) != -1)
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
@@ -369,7 +369,7 @@ namespace Content.Client.Construction
|
||||
|
||||
private static int ComparePrototype(ConstructionPrototype x, ConstructionPrototype y)
|
||||
{
|
||||
return x.Name.CompareTo(y.Name);
|
||||
return String.Compare(x.Name, y.Name, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
class CategoryNode
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
using Content.Client.GameObjects.Components.Construction;
|
||||
using Content.Shared.Construction;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Interfaces.ResourceManagement;
|
||||
using Robust.Client.Placement;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.Utility;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
namespace Content.Client.Construction
|
||||
{
|
||||
@@ -46,7 +43,6 @@ namespace Content.Client.Construction
|
||||
{
|
||||
base.StartHijack(manager);
|
||||
|
||||
var res = IoCManager.Resolve<IResourceCache>();
|
||||
manager.CurrentBaseSprite = Prototype.Icon.DirFrame0();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ using Robust.Shared.Interfaces.Configuration;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Client
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// Only unused on .NET Core due to KeyValuePair.Deconstruct
|
||||
// ReSharper disable once RedundantUsingDirective
|
||||
using Robust.Shared.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Shared.Access;
|
||||
@@ -6,7 +9,6 @@ using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Utility;
|
||||
using static Content.Shared.GameObjects.Components.Access.SharedIdCardConsoleComponent;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Access
|
||||
|
||||
@@ -20,9 +20,8 @@ namespace Content.Client.GameObjects
|
||||
{
|
||||
base.HandleComponentState(curState, nextState);
|
||||
|
||||
if(curState is DamageComponentState)
|
||||
if(curState is DamageComponentState damagestate)
|
||||
{
|
||||
var damagestate = (DamageComponentState)curState;
|
||||
CurrentDamage = damagestate.CurrentDamage;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
using System;
|
||||
// Only unused on .NET Core due to KeyValuePair.Deconstruct
|
||||
// ReSharper disable once RedundantUsingDirective
|
||||
using Robust.Shared.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Client.GameObjects.Components.Clothing;
|
||||
using Content.Shared.GameObjects;
|
||||
using Content.Shared.GameObjects.Components.Inventory;
|
||||
using Content.Shared.GameObjects.Components.Storage;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Network;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines;
|
||||
using static Content.Shared.GameObjects.SharedInventoryComponent.ClientInventoryMessage;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
// Only unused on .NET Core due to KeyValuePair.Deconstruct
|
||||
// ReSharper disable once RedundantUsingDirective
|
||||
using Robust.Shared.Utility;using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Client.GameObjects.Components.Storage;
|
||||
using Content.Client.Utility;
|
||||
@@ -12,7 +14,6 @@ using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Utility;
|
||||
using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines;
|
||||
|
||||
namespace Content.Client.GameObjects
|
||||
@@ -55,7 +56,7 @@ namespace Content.Client.GameObjects
|
||||
void AddButton(out InventoryButton variable, Slots slot, string textureName)
|
||||
{
|
||||
var texture = _resourceCache.GetTexture($"/Textures/UserInterface/Inventory/{textureName}.png");
|
||||
var storageTexture = _resourceCache.GetTexture($"/Textures/UserInterface/Inventory/back.png");
|
||||
var storageTexture = _resourceCache.GetTexture("/Textures/UserInterface/Inventory/back.png");
|
||||
variable = new InventoryButton(slot, texture, storageTexture)
|
||||
{
|
||||
OnPressed = AddToInventory,
|
||||
@@ -170,7 +171,7 @@ namespace Content.Client.GameObjects
|
||||
void AddButton(Slots slot, string textureName, Vector2 position)
|
||||
{
|
||||
var texture = resourceCache.GetTexture($"/Textures/UserInterface/Inventory/{textureName}.png");
|
||||
var storageTexture = resourceCache.GetTexture($"/Textures/UserInterface/Inventory/back.png");
|
||||
var storageTexture = resourceCache.GetTexture("/Textures/UserInterface/Inventory/back.png");
|
||||
var button = new InventoryButton(slot, texture, storageTexture)
|
||||
{
|
||||
Position = position
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
// Only unused on .NET Core due to KeyValuePair.Deconstruct
|
||||
// ReSharper disable once RedundantUsingDirective
|
||||
using Robust.Shared.Utility;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Client.Interfaces.GameObjects;
|
||||
using Content.Client.UserInterface;
|
||||
@@ -10,7 +13,6 @@ using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Network;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Client.GameObjects
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Diagnostics.Contracts;
|
||||
using Content.Client.GameObjects.Components.IconSmoothing;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
@@ -179,7 +180,7 @@ namespace Content.Client.GameObjects.Components
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.Contracts.Pure]
|
||||
[Pure]
|
||||
private (bool connected, bool lowWall) MatchingWall(IEnumerable<IEntity> candidates)
|
||||
{
|
||||
foreach (var entity in candidates)
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
// Only unused on .NET Core due to KeyValuePair.Deconstruct
|
||||
// ReSharper disable once RedundantUsingDirective
|
||||
using Robust.Shared.Utility;
|
||||
using System.Text;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.Utility;
|
||||
using static Content.Shared.GameObjects.Components.Medical.SharedMedicalScannerComponent;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.MedicalScanner
|
||||
{
|
||||
public class MedicalScannerWindow : SS14Window
|
||||
{
|
||||
public MedicalScannerWindow()
|
||||
{
|
||||
}
|
||||
|
||||
public void Populate(MedicalScannerBoundUserInterfaceState state)
|
||||
{
|
||||
Contents.RemoveAllChildren();
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Client.UserInterface;
|
||||
@@ -14,7 +13,6 @@ using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Network;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Mobs
|
||||
{
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Mobs
|
||||
{
|
||||
public class SpeciesVisualizer2D : AppearanceVisualizer
|
||||
{
|
||||
public override void InitializeEntity(IEntity entity)
|
||||
{
|
||||
base.InitializeEntity(entity);
|
||||
}
|
||||
|
||||
public override void OnChangeData(AppearanceComponent component)
|
||||
{
|
||||
base.OnChangeData(component);
|
||||
@@ -20,7 +14,7 @@ namespace Content.Client.GameObjects.Components.Mobs
|
||||
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
||||
if (component.TryGetData<SharedSpeciesComponent.MobState>(SharedSpeciesComponent.MobVisuals.RotationState, out var state))
|
||||
{
|
||||
switch (state)
|
||||
switch (state)
|
||||
{
|
||||
case SharedSpeciesComponent.MobState.Stand:
|
||||
sprite.Rotation = 0;
|
||||
@@ -32,4 +26,4 @@ namespace Content.Client.GameObjects.Components.Mobs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Content.Client.GameObjects.Components.Nutrition
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite.LayerSetState(0, $"icon-0");
|
||||
sprite.LayerSetState(0, "icon-0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ using Content.Client.UserInterface;
|
||||
using Content.Shared.GameObjects.Components.Power;
|
||||
using Robust.Client.GameObjects.Components.UserInterface;
|
||||
using Robust.Client.Graphics.Drawing;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||
@@ -153,7 +152,7 @@ namespace Content.Client.GameObjects.Components.Power
|
||||
var chargeLabel = new Label {Text = "Charge:"};
|
||||
ChargeBar = new ProgressBar
|
||||
{
|
||||
SizeFlagsHorizontal = Control.SizeFlags.FillExpand,
|
||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||
MinValue = 0.0f,
|
||||
MaxValue = 1.0f,
|
||||
Page = 0.0f,
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Power
|
||||
{
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Content.Client.GameObjects.Components.Research
|
||||
if (!_prototypeManager.TryIndex(msg.ID, out LatheRecipePrototype recipe)) break;
|
||||
queueMenu?.SetInfo(recipe);
|
||||
break;
|
||||
case SharedLatheComponent.LatheStoppedProducingRecipeMessage msg:
|
||||
case SharedLatheComponent.LatheStoppedProducingRecipeMessage _:
|
||||
queueMenu?.ClearInfo();
|
||||
break;
|
||||
case SharedLatheComponent.LatheFullQueueMessage msg:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Content.Shared.GameObjects.Components.Research;
|
||||
using Robust.Client.GameObjects.Components.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Research
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using Content.Shared.GameObjects.Components.Research;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
@@ -2,9 +2,7 @@ using Content.Client.Research;
|
||||
using Content.Shared.GameObjects.Components.Research;
|
||||
using Content.Shared.Research;
|
||||
using Robust.Client.GameObjects.Components.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||
using Robust.Shared.Log;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Research
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@ using Content.Shared.Research;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Prototypes;
|
||||
using SixLabors.ImageSharp.Processing;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Research
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.GameObjects.Components.Sound;
|
||||
using Robust.Client.GameObjects.EntitySystems;
|
||||
@@ -82,7 +81,7 @@ namespace Content.Client.GameObjects.Components.Sound
|
||||
StopScheduledSound(msg.Filename);
|
||||
break;
|
||||
|
||||
case StopAllSoundsMessage msg:
|
||||
case StopAllSoundsMessage _:
|
||||
StopAllSounds();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Network;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Storage
|
||||
{
|
||||
@@ -39,11 +38,6 @@ namespace Content.Client.GameObjects.Components.Storage
|
||||
base.OnRemove();
|
||||
}
|
||||
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
}
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null,
|
||||
IComponent component = null)
|
||||
{
|
||||
@@ -54,10 +48,10 @@ namespace Content.Client.GameObjects.Components.Storage
|
||||
HandleStorageMessage(msg);
|
||||
break;
|
||||
//Opens the UI
|
||||
case OpenStorageUIMessage msg:
|
||||
case OpenStorageUIMessage _:
|
||||
OpenUI();
|
||||
break;
|
||||
case CloseStorageUIMessage msg:
|
||||
case CloseStorageUIMessage _:
|
||||
CloseUI();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2,14 +2,7 @@
|
||||
using Content.Shared.GameObjects.Components.VendingMachines;
|
||||
using Robust.Client.GameObjects.Components.UserInterface;
|
||||
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.VendingMachines
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Content.Client.GameObjects.Components.Doors;
|
||||
using Robust.Client.Animations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.GameObjects.Components.Animations;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using Content.Shared.GameObjects.Components.Weapons.Ranged;
|
||||
using Content.Shared.Utility;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Utility;
|
||||
using YamlDotNet.RepresentationModel;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Content.Shared.Utility;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Utility;
|
||||
using YamlDotNet.RepresentationModel;
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Maths;
|
||||
using static Content.Shared.GameObjects.Components.SharedWiresComponent;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System.Linq;
|
||||
using Content.Client.GameObjects.Components.Mobs;
|
||||
using Content.Client.GameObjects.Components.Weapons.Melee;
|
||||
using Content.Shared.GameObjects.Components.Weapons.Melee;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Content.Client.GameObjects.Components.Weapons.Ranged;
|
||||
using Content.Client.Interfaces.GameObjects;
|
||||
using Content.Shared.Input;
|
||||
using Robust.Client.GameObjects.EntitySystems;
|
||||
using Robust.Client.Interfaces.Graphics.ClientEye;
|
||||
using Robust.Client.Interfaces.Input;
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.GameObjects.Components;
|
||||
using Content.Client.GameObjects.Components.IconSmoothing;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components.Transform;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Robust.Client.Graphics.Overlays;
|
||||
using Robust.Client.Graphics.Shaders;
|
||||
using Robust.Client.Interfaces.Graphics.ClientEye;
|
||||
using Robust.Client.Interfaces.Graphics.Overlays;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Robust.Client.Graphics.Overlays;
|
||||
using Robust.Client.Graphics.Shaders;
|
||||
using Robust.Client.Interfaces.Graphics.ClientEye;
|
||||
using Robust.Client.Interfaces.Graphics.Overlays;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Content.Client.Chat;
|
||||
using Robust.Client;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using Content.Client.UserInterface;
|
||||
using Robust.Client;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Client.Interfaces
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Content.Shared.Interfaces;
|
||||
using Robust.Client;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
|
||||
@@ -3,16 +3,15 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using Nett;
|
||||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using SixLabors.Primitives;
|
||||
using Robust.Client.Utility;
|
||||
using Robust.Shared.Interfaces.Log;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Noise;
|
||||
using Robust.Shared.Random;
|
||||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.Advanced;
|
||||
using BlendFactor = Robust.Shared.Maths.Color.BlendFactor;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using SixLabors.Primitives;
|
||||
|
||||
namespace Content.Client.Parallax
|
||||
{
|
||||
@@ -84,8 +83,8 @@ namespace Content.Client.Parallax
|
||||
private readonly uint Octaves = 3;
|
||||
private readonly float Threshold;
|
||||
private readonly float Power = 1;
|
||||
private readonly BlendFactor SrcFactor = BlendFactor.One;
|
||||
private readonly BlendFactor DstFactor = BlendFactor.One;
|
||||
private readonly Color.BlendFactor SrcFactor = Color.BlendFactor.One;
|
||||
private readonly Color.BlendFactor DstFactor = Color.BlendFactor.One;
|
||||
|
||||
public LayerNoise(TomlTable table)
|
||||
{
|
||||
@@ -131,12 +130,12 @@ namespace Content.Client.Parallax
|
||||
|
||||
if (table.TryGetValue("sourcefactor", out tomlObject))
|
||||
{
|
||||
SrcFactor = (BlendFactor) Enum.Parse(typeof(BlendFactor), tomlObject.Get<string>());
|
||||
SrcFactor = (Color.BlendFactor) Enum.Parse(typeof(Color.BlendFactor), tomlObject.Get<string>());
|
||||
}
|
||||
|
||||
if (table.TryGetValue("destfactor", out tomlObject))
|
||||
{
|
||||
DstFactor = (BlendFactor) Enum.Parse(typeof(BlendFactor), tomlObject.Get<string>());
|
||||
DstFactor = (Color.BlendFactor) Enum.Parse(typeof(Color.BlendFactor), tomlObject.Get<string>());
|
||||
}
|
||||
|
||||
if (table.TryGetValue("power", out tomlObject))
|
||||
@@ -208,8 +207,8 @@ namespace Content.Client.Parallax
|
||||
private readonly Color CloseColor = Color.White;
|
||||
private readonly Color FarColor = Color.Black;
|
||||
|
||||
private readonly BlendFactor SrcFactor = BlendFactor.One;
|
||||
private readonly BlendFactor DstFactor = BlendFactor.One;
|
||||
private readonly Color.BlendFactor SrcFactor = Color.BlendFactor.One;
|
||||
private readonly Color.BlendFactor DstFactor = Color.BlendFactor.One;
|
||||
|
||||
// Noise mask stuff.
|
||||
private readonly bool Masked;
|
||||
@@ -238,12 +237,12 @@ namespace Content.Client.Parallax
|
||||
|
||||
if (table.TryGetValue("sourcefactor", out tomlObject))
|
||||
{
|
||||
SrcFactor = (BlendFactor) Enum.Parse(typeof(BlendFactor), tomlObject.Get<string>());
|
||||
SrcFactor = (Color.BlendFactor) Enum.Parse(typeof(Color.BlendFactor), tomlObject.Get<string>());
|
||||
}
|
||||
|
||||
if (table.TryGetValue("destfactor", out tomlObject))
|
||||
{
|
||||
DstFactor = (BlendFactor) Enum.Parse(typeof(BlendFactor), tomlObject.Get<string>());
|
||||
DstFactor = (Color.BlendFactor) Enum.Parse(typeof(Color.BlendFactor), tomlObject.Get<string>());
|
||||
}
|
||||
|
||||
if (table.TryGetValue("farcolor", out tomlObject))
|
||||
|
||||
@@ -4,7 +4,6 @@ using Robust.Client.Graphics.Drawing;
|
||||
using Robust.Client.Graphics.Overlays;
|
||||
using Robust.Client.Graphics.Shaders;
|
||||
using Robust.Client.Interfaces.Graphics.ClientEye;
|
||||
using Robust.Client.Interfaces.Graphics.Overlays;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Only unused on .NET Core due to KeyValuePair.Deconstruct
|
||||
// ReSharper disable once RedundantUsingDirective
|
||||
using Robust.Shared.Utility;
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.GameObjects.Components.Research;
|
||||
using Content.Shared.GameObjects.Components.Research;
|
||||
using Content.Shared.Materials;
|
||||
using Content.Shared.Research;
|
||||
using Robust.Client.UserInterface;
|
||||
@@ -10,8 +12,6 @@ using Robust.Client.Utility;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Timers;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Client.Research
|
||||
{
|
||||
@@ -219,9 +219,8 @@ namespace Content.Client.Research
|
||||
public void PopulateList()
|
||||
{
|
||||
Items.Clear();
|
||||
for (var i = 0; i < _shownRecipes.Count; i++)
|
||||
foreach (var prototype in _shownRecipes)
|
||||
{
|
||||
var prototype = _shownRecipes[i];
|
||||
Items.AddItem(prototype.Name, prototype.Icon.Frame0());
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,11 @@ using System.Collections.Generic;
|
||||
using Content.Client.GameObjects.Components.Research;
|
||||
using Content.Shared.Research;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.Utility;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Robust.Client.Console;
|
||||
using Robust.Client.Interfaces.Graphics;
|
||||
using Robust.Client.Interfaces.Placement;
|
||||
using Robust.Client.Interfaces.ResourceManagement;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.Interfaces.Configuration;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using Content.Client.Utility;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Interfaces.ResourceManagement;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Client.UserInterface
|
||||
{
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
using Content.Client.GameObjects.Components.VendingMachines;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Content.Client.GameObjects.Components.VendingMachines;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.Interfaces.ResourceManagement;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Prototypes;
|
||||
using static Content.Shared.GameObjects.Components.VendingMachines.SharedVendingMachineComponent;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user