Refactor a bunch of stuff.

This commit is contained in:
zumorica
2020-05-19 13:55:52 +02:00
parent 06c7030514
commit 06d2cc74ed
17 changed files with 153 additions and 347 deletions

View File

@@ -142,7 +142,7 @@ namespace Content.Server.GameObjects.Components.Power
public bool AttackBy(AttackByEventArgs eventArgs)
{
if (!eventArgs.AttackWith.TryGetComponent(out ToolComponent tool)) return false;
if (tool.Behavior != Tool.Wirecutter) return false;
if (!tool.UseTool(eventArgs.User, Owner, ToolQuality.Cutting)) return false;
Owner.Delete();
var droppedEnt = Owner.EntityManager.SpawnEntity("CableStack", eventArgs.ClickLocation);