Update trivial components to use auto comp states (#20539)
This commit is contained in:
@@ -110,7 +110,7 @@ public sealed class EnergySwordSystem : EntitySystem
|
||||
{
|
||||
weaponComp.HitSound = comp.OnHitOff;
|
||||
if (comp.Secret)
|
||||
weaponComp.HideFromExamine = true;
|
||||
weaponComp.Hidden = true;
|
||||
}
|
||||
|
||||
if (comp.IsSharp)
|
||||
@@ -135,7 +135,7 @@ public sealed class EnergySwordSystem : EntitySystem
|
||||
{
|
||||
weaponComp.HitSound = comp.OnHitOn;
|
||||
if (comp.Secret)
|
||||
weaponComp.HideFromExamine = false;
|
||||
weaponComp.Hidden = false;
|
||||
}
|
||||
|
||||
if (TryComp<DisarmMalusComponent>(uid, out var malus))
|
||||
|
||||
@@ -8,11 +8,13 @@ using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.CombatMode.Disarm;
|
||||
using Content.Server.Contests;
|
||||
using Content.Server.Movement.Systems;
|
||||
using Content.Shared.Administration.Components;
|
||||
using Content.Shared.Actions.Events;
|
||||
using Content.Shared.Administration.Components;
|
||||
using Content.Shared.CombatMode;
|
||||
using Content.Shared.Damage.Events;
|
||||
using Content.Shared.Damage.Systems;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Effects;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.IdentityManagement;
|
||||
@@ -29,8 +31,6 @@ using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Random;
|
||||
using Content.Shared.Effects;
|
||||
using Content.Shared.Damage.Systems;
|
||||
|
||||
namespace Content.Server.Weapons.Melee;
|
||||
|
||||
@@ -57,7 +57,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
|
||||
|
||||
private void OnMeleeExamineDamage(EntityUid uid, MeleeWeaponComponent component, ref DamageExamineEvent args)
|
||||
{
|
||||
if (component.HideFromExamine)
|
||||
if (component.Hidden)
|
||||
return;
|
||||
|
||||
var damageSpec = GetDamage(uid, args.User, component);
|
||||
|
||||
@@ -22,7 +22,7 @@ public sealed partial class GunSystem
|
||||
else if (component.UnspawnedCount > 0)
|
||||
{
|
||||
component.UnspawnedCount--;
|
||||
ent = Spawn(component.FillProto, coordinates);
|
||||
ent = Spawn(component.Proto, coordinates);
|
||||
EnsureShootable(ent.Value);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,12 +54,12 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
|
||||
private void OnBallisticPrice(EntityUid uid, BallisticAmmoProviderComponent component, ref PriceCalculationEvent args)
|
||||
{
|
||||
if (string.IsNullOrEmpty(component.FillProto) || component.UnspawnedCount == 0)
|
||||
if (string.IsNullOrEmpty(component.Proto) || component.UnspawnedCount == 0)
|
||||
return;
|
||||
|
||||
if (!ProtoManager.TryIndex<EntityPrototype>(component.FillProto, out var proto))
|
||||
if (!ProtoManager.TryIndex<EntityPrototype>(component.Proto, out var proto))
|
||||
{
|
||||
Log.Error($"Unable to find fill prototype for price on {component.FillProto} on {ToPrettyString(uid)}");
|
||||
Log.Error($"Unable to find fill prototype for price on {component.Proto} on {ToPrettyString(uid)}");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user