More miscellaneous compiler warning fixes (#18228)

This commit is contained in:
metalgearsloth
2023-07-23 16:03:57 +10:00
committed by GitHub
parent cfb827c99b
commit e755509fc7
12 changed files with 103 additions and 82 deletions

View File

@@ -8,6 +8,7 @@ using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using System;
using System.Linq;
using JetBrains.Annotations;
namespace Content.Shared.Weapons.Ranged.Systems;
@@ -164,7 +165,7 @@ public partial class SharedGunSystem
Popup(Loc.GetString("gun-revolver-insert"), revolverUid, user);
UpdateRevolverAppearance(revolverUid, component);
UpdateAmmoCount(uid);
Dirty(component);
Dirty(uid, component);
return true;
}
@@ -223,6 +224,7 @@ public partial class SharedGunSystem
return count;
}
[PublicAPI]
private int GetRevolverUnspentCount(RevolverAmmoProviderComponent component)
{
var count = 0;
@@ -261,7 +263,8 @@ public partial class SharedGunSystem
if (slot == null)
{
if (chamber == null) continue;
if (chamber == null)
continue;
// Too lazy to make a new method don't sue me.
if (!_netManager.IsClient)
@@ -294,7 +297,7 @@ public partial class SharedGunSystem
Audio.PlayPredicted(component.SoundEject, revolverUid, user);
UpdateAmmoCount(revolverUid);
UpdateRevolverAppearance(revolverUid, component);
Dirty(component);
Dirty(revolverUid, component);
}
}
@@ -366,12 +369,12 @@ public partial class SharedGunSystem
component.AmmoContainer.Remove(ent.Value);
component.AmmoSlots[index] = null;
args.Ammo.Add((ent.Value, EnsureComp<AmmoComponent>(ent.Value)));
Transform(ent.Value).Coordinates = args.Coordinates;
TransformSystem.SetCoordinates(ent.Value, args.Coordinates);
}
}
UpdateRevolverAppearance(uid, component);
Dirty(component);
Dirty(uid, component);
}
private void Cycle(RevolverAmmoProviderComponent component, int count = 1)