Extracts magic strings from Tag calls (#36305)
* Extracts magic strings from Tag calls When #36281 gets merged, the `TagSystem` methods will all give warnings. Let's fix those warnings before they even happen! * Adds missing libraries * Remove not yet implemented TagSystem changes * Fix tag spelling error Genuinely surprised there was only 1! * Styling and proper type changes * Styling Co-authored-by: Tayrtahn <tayrtahn@gmail.com> --------- Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
This commit is contained in:
@@ -62,6 +62,8 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
|
||||
[ValidatePrototypeId<DamageTypePrototype>]
|
||||
private const string DamageType = "Shock";
|
||||
|
||||
private static readonly ProtoId<TagPrototype> WindowTag = "Window";
|
||||
|
||||
// Multiply and shift the log scale for shock damage.
|
||||
private const float RecursiveDamageMultiplier = 0.75f;
|
||||
private const float RecursiveTimeMultiplier = 0.8f;
|
||||
@@ -139,7 +141,7 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
|
||||
{
|
||||
foreach (var entity in _entityLookup.GetLocalEntitiesIntersecting(tileRef.Value, flags: LookupFlags.StaticSundries))
|
||||
{
|
||||
if (_tag.HasTag(entity, "Window"))
|
||||
if (_tag.HasTag(entity, WindowTag))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user