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,7 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.GameObjects;
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
|
||||
namespace Content.Server.GameObjects
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using Content.Shared.GameObjects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Mobs;
|
||||
using Content.Shared.GameObjects;
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using JetBrains.Annotations;
|
||||
using ScreenEffects = Content.Shared.GameObjects.Components.Mobs.ScreenEffects;
|
||||
|
||||
namespace Content.Server.GameObjects
|
||||
{
|
||||
@@ -46,7 +46,7 @@ namespace Content.Server.GameObjects
|
||||
var totaldamage = damage.CurrentDamage[DamageType.Total];
|
||||
if (totaldamage > critvalue)
|
||||
{
|
||||
throw new System.InvalidOperationException(); //these should all be below the crit value, possibly going over multiple thresholds at once?
|
||||
throw new InvalidOperationException(); //these should all be below the crit value, possibly going over multiple thresholds at once?
|
||||
}
|
||||
var modifier = totaldamage / (critvalue / normalstates); //integer division floors towards zero
|
||||
statusEffectsComponent?.ChangeStatus(StatusEffect.Health,
|
||||
@@ -70,7 +70,7 @@ namespace Content.Server.GameObjects
|
||||
|
||||
return;
|
||||
default:
|
||||
throw new System.InvalidOperationException();
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Mobs;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Mobs
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Mobs;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Server.Interfaces;
|
||||
using Content.Shared.GameObjects;
|
||||
using Content.Shared.GameObjects.Components.Mobs;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.ContentPack;
|
||||
@@ -179,8 +180,8 @@ namespace Content.Server.GameObjects
|
||||
bruteDamage += 30;
|
||||
break;
|
||||
}
|
||||
Owner.GetComponent<DamageableComponent>().TakeDamage(Shared.GameObjects.DamageType.Brute, bruteDamage);
|
||||
Owner.GetComponent<DamageableComponent>().TakeDamage(Shared.GameObjects.DamageType.Heat, burnDamage);
|
||||
Owner.GetComponent<DamageableComponent>().TakeDamage(DamageType.Brute, bruteDamage);
|
||||
Owner.GetComponent<DamageableComponent>().TakeDamage(DamageType.Heat, burnDamage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user