add fuel costs back to finishing welding (#27030)

* add fuel costs back to welding

* ack

* meh

* eek!
This commit is contained in:
Nemanja
2024-04-19 19:20:30 -04:00
committed by GitHub
parent 299da35c87
commit a47c5561a9
26 changed files with 403 additions and 466 deletions

View File

@@ -1,10 +1,8 @@
using Content.Client.Items;
using Content.Client.Tools.Components;
using Content.Client.Tools.UI;
using Content.Shared.Item;
using Content.Shared.Tools.Components;
using Robust.Client.GameObjects;
using Robust.Shared.GameStates;
using SharedToolSystem = Content.Shared.Tools.Systems.SharedToolSystem;
namespace Content.Client.Tools
@@ -15,7 +13,6 @@ namespace Content.Client.Tools
{
base.Initialize();
SubscribeLocalEvent<WelderComponent, ComponentHandleState>(OnWelderHandleState);
Subs.ItemStatus<WelderComponent>(ent => new WelderStatusControl(ent));
Subs.ItemStatus<MultipleToolComponent>(ent => new MultipleToolStatusControl(ent));
}
@@ -42,20 +39,5 @@ namespace Content.Client.Tools
sprite.LayerSetSprite(0, current.Sprite);
}
}
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.UiUpdateNeeded = true;
}
protected override bool IsWelder(EntityUid uid)
{
return HasComp<WelderComponent>(uid);
}
}
}