Fix warnings and code cleanup/fixes (#13570)

This commit is contained in:
Visne
2023-01-19 03:56:45 +01:00
committed by GitHub
parent 3ca5a0224b
commit c6d3e4f3bd
265 changed files with 499 additions and 666 deletions

View File

@@ -11,8 +11,8 @@ namespace Content.Server.Contests
/// A contest is figuring out, based on data in components on two entities,
/// which one has an advantage in a situation. The advantage is expressed by a multiplier.
/// 1 = No advantage to either party.
/// >1 = Advantage to roller
/// <1 = Advantage to target
/// &gt;1 = Advantage to roller
/// &lt;1 = Advantage to target
/// Roller should be the entity with an advantage from being bigger/healthier/more skilled, etc.
/// </summary>
///
@@ -39,7 +39,7 @@ namespace Content.Server.Contests
/// After that, it runs the % towards crit through a converter that smooths out and makes
/// the the ratios less severe.
/// Returns the roller's adjusted damage value divided by the target's. Higher is better for the roller.
/// <summary>
/// </summary>
public float DamageContest(EntityUid roller, EntityUid target, DamageableComponent? rollerDamage = null, DamageableComponent? targetDamage = null)
{
if (!Resolve(roller, ref rollerDamage, false) || !Resolve(target, ref targetDamage, false))
@@ -85,7 +85,7 @@ namespace Content.Server.Contests
/// Finds the % of each entity's stamina damage towards its stam crit threshold.
/// It then runs the % towards the converter to smooth/soften it.
/// Returns the roller's decimal % divided by the target's. Higher value is better for the roller.
/// <summary>
/// </summary>
public float StaminaContest(EntityUid roller, EntityUid target, StaminaComponent? rollerStamina = null, StaminaComponent? targetStamina = null)
{
if (!Resolve(roller, ref rollerStamina, false) || !Resolve(target, ref targetStamina, false))
@@ -101,7 +101,7 @@ namespace Content.Server.Contests
/// This will compare the roller and target's damage, mass, and stamina. See the functions for what each one does.
/// You can change the 'weighting' to make the tests weigh more or less than the other tests.
/// Returns a weighted average of all 3 tests.
/// <summary>
/// </summary>
public float OverallStrengthContest(EntityUid roller, EntityUid target, float damageWeight = 1f, float massWeight = 1f, float stamWeight = 1f)
{
var weightTotal = damageWeight + massWeight + stamWeight;