Reduce door hacking time (#8852)

This commit is contained in:
metalgearsloth
2022-06-16 16:14:34 +10:00
committed by GitHub
parent 4c5cf6f032
commit 0d89619845

View File

@@ -34,8 +34,8 @@ public sealed class WiresSystem : EntitySystem
// This is where all the wire layouts are stored. // This is where all the wire layouts are stored.
[ViewVariables] private readonly Dictionary<string, WireLayout> _layouts = new(); [ViewVariables] private readonly Dictionary<string, WireLayout> _layouts = new();
private const float ScrewTime = 2.5f; private const float ScrewTime = 1f;
private const float ToolTime = 1f; private float _toolTime = 0f;
private static DummyWireAction _dummyWire = new DummyWireAction(); private static DummyWireAction _dummyWire = new DummyWireAction();
@@ -649,7 +649,9 @@ public sealed class WiresSystem : EntitySystem
break; break;
} }
var args = new DoAfterEventArgs(user, ToolTime, default, used) if (_toolTime > 0f)
{
var args = new DoAfterEventArgs(user, _toolTime, default, used)
{ {
NeedHand = true, NeedHand = true,
BreakOnStun = true, BreakOnStun = true,
@@ -668,10 +670,16 @@ public sealed class WiresSystem : EntitySystem
Id = id Id = id
} }
}; };
_doAfter.DoAfter(args); _doAfter.DoAfter(args);
wires.WiresQueue.Add(id); wires.WiresQueue.Add(id);
} }
else
{
UpdateWires(used, user, toolEntity, id, action, wires);
}
}