Replace ValidatePrototypeId uses with ProtoId or EntProtoId (#38814)
* The easy ones * For certain values of easy * Easy test * Hair * Fix sandbox violations * Sort usings
This commit is contained in:
@@ -58,12 +58,8 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
|
||||
[Dependency] private readonly MetaDataSystem _metaData = default!;
|
||||
[Dependency] private readonly TurfSystem _turf = default!;
|
||||
|
||||
[ValidatePrototypeId<StatusEffectPrototype>]
|
||||
private const string StatusEffectKey = "Electrocution";
|
||||
|
||||
[ValidatePrototypeId<DamageTypePrototype>]
|
||||
private const string DamageType = "Shock";
|
||||
|
||||
private static readonly ProtoId<StatusEffectPrototype> StatusEffectKey = "Electrocution";
|
||||
private static readonly ProtoId<DamageTypePrototype> DamageType = "Shock";
|
||||
private static readonly ProtoId<TagPrototype> WindowTag = "Window";
|
||||
|
||||
// Multiply and shift the log scale for shock damage.
|
||||
@@ -408,7 +404,7 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
|
||||
if (shockDamage is { } dmg)
|
||||
{
|
||||
var actual = _damageable.TryChangeDamage(uid,
|
||||
new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>(DamageType), dmg), origin: sourceUid);
|
||||
new DamageSpecifier(_prototypeManager.Index(DamageType), dmg), origin: sourceUid);
|
||||
|
||||
if (actual != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user