Fix electrocution (#7015)
This commit is contained in:
@@ -47,6 +47,7 @@ namespace Content.Server.Electrocution
|
|||||||
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
||||||
[Dependency] private readonly NodeGroupSystem _nodeGroupSystem = default!;
|
[Dependency] private readonly NodeGroupSystem _nodeGroupSystem = default!;
|
||||||
[Dependency] private readonly AdminLogSystem _logSystem = default!;
|
[Dependency] private readonly AdminLogSystem _logSystem = default!;
|
||||||
|
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||||
|
|
||||||
private const string StatusEffectKey = "Electrocution";
|
private const string StatusEffectKey = "Electrocution";
|
||||||
private const string DamageType = "Shock";
|
private const string DamageType = "Shock";
|
||||||
@@ -166,14 +167,12 @@ namespace Content.Server.Electrocution
|
|||||||
if (!electrified.Enabled)
|
if (!electrified.Enabled)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var tagSystem = EntitySystem.Get<TagSystem>();
|
|
||||||
|
|
||||||
if (electrified.NoWindowInTile)
|
if (electrified.NoWindowInTile)
|
||||||
{
|
{
|
||||||
foreach (var entity in transform.Coordinates.GetEntitiesInTile(
|
foreach (var entity in transform.Coordinates.GetEntitiesInTile(
|
||||||
LookupFlags.Approximate | LookupFlags.IncludeAnchored, _entityLookup))
|
LookupFlags.Approximate | LookupFlags.IncludeAnchored, _entityLookup))
|
||||||
{
|
{
|
||||||
if (tagSystem.HasTag(entity, "Window"))
|
if (_tagSystem.HasTag(entity, "Window"))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
nodes:
|
nodes:
|
||||||
electrocution: !type:ElectrocutionNode
|
electrocution: !type:ElectrocutionNode
|
||||||
nodeGroupID: HVPower
|
nodeGroupID: HVPower
|
||||||
|
needAnchored: false
|
||||||
- type: PowerConsumer
|
- type: PowerConsumer
|
||||||
voltage: High
|
voltage: High
|
||||||
drawRate: 50000
|
drawRate: 50000
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
nodes:
|
nodes:
|
||||||
electrocution: !type:ElectrocutionNode
|
electrocution: !type:ElectrocutionNode
|
||||||
nodeGroupID: MVPower
|
nodeGroupID: MVPower
|
||||||
|
needAnchored: false
|
||||||
- type: PowerConsumer
|
- type: PowerConsumer
|
||||||
voltage: Medium
|
voltage: Medium
|
||||||
drawRate: 50000
|
drawRate: 50000
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
nodes:
|
nodes:
|
||||||
electrocution: !type:ElectrocutionNode
|
electrocution: !type:ElectrocutionNode
|
||||||
nodeGroupID: Apc
|
nodeGroupID: Apc
|
||||||
|
needAnchored: false
|
||||||
- type: PowerConsumer
|
- type: PowerConsumer
|
||||||
voltage: Apc
|
voltage: Apc
|
||||||
drawRate: 50000
|
drawRate: 50000
|
||||||
|
|||||||
Reference in New Issue
Block a user