Add WelderComponent back

This commit is contained in:
zumorica
2020-05-11 15:26:07 +02:00
parent 6ae5e36a18
commit b1db8d1e7a
11 changed files with 334 additions and 198 deletions

View File

@@ -738,10 +738,11 @@ namespace Content.Server.GameObjects.EntitySystems
case Tool.Welder:
var welderList = attacked.GetAllComponents<IWelderAct>().ToList();
var welder = (WelderComponent) tool;
var welderAttackBy = new WelderActEventArgs()
{
User = user, ClickLocation = clickLocation, AttackWith = weapon,
Fuel = tool.Fuel, FuelCapacity = tool.FuelCapacity
Fuel = welder.Fuel, FuelCapacity = welder.FuelCapacity
};
foreach (var comp in welderList)

View File

@@ -8,16 +8,16 @@ namespace Content.Server.GameObjects.EntitySystems
/// <summary>
/// Despite the name, it's only really used for the welder logic in tools. Go figure.
/// </summary>
public class ToolSystem : EntitySystem
public class WelderSystem : EntitySystem
{
private readonly HashSet<ToolComponent> _activeWelders = new HashSet<ToolComponent>();
private readonly HashSet<WelderComponent> _activeWelders = new HashSet<WelderComponent>();
public bool Subscribe(ToolComponent welder)
public bool Subscribe(WelderComponent welder)
{
return _activeWelders.Add(welder);
}
public bool Unsubscribe(ToolComponent welder)
public bool Unsubscribe(WelderComponent welder)
{
return _activeWelders.Remove(welder);
}