Makes tools and welders ECS, add ToolQualityPrototype. (#4741)

This commit is contained in:
Vera Aguilera Puerto
2021-10-07 13:01:27 +02:00
committed by GitHub
parent f2760d0002
commit 365c7da4dc
44 changed files with 1144 additions and 863 deletions

View File

@@ -0,0 +1,28 @@
using Content.Client.Tools.Components;
using Content.Shared.Tools.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
namespace Content.Client.Tools
{
public class ToolSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<WelderComponent, ComponentHandleState>(OnWelderHandleState);
}
private void OnWelderHandleState(EntityUid uid, WelderComponent welder, ref ComponentHandleState args)
{
if (args.Current is not WelderComponentState state)
return;
welder.FuelCapacity = state.FuelCapacity;
welder.Fuel = state.Fuel;
welder.Lit = state.Lit;
welder.UiUpdateNeeded = true;
}
}
}