Machine upgrade examine verb (#12119)

This commit is contained in:
0x6273
2022-11-04 04:27:47 +01:00
committed by GitHub
parent 5ede1f4862
commit a201d777bc
22 changed files with 205 additions and 3 deletions

View File

@@ -39,6 +39,7 @@ namespace Content.Server.Lathe
SubscribeLocalEvent<LatheComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<LatheComponent, PowerChangedEvent>(OnPowerChanged);
SubscribeLocalEvent<LatheComponent, RefreshPartsEvent>(OnPartsRefresh);
SubscribeLocalEvent<LatheComponent, UpgradeExamineEvent>(OnUpgradeExamine);
SubscribeLocalEvent<LatheComponent, LatheQueueRecipeMessage>(OnLatheQueueRecipeMessage);
SubscribeLocalEvent<LatheComponent, LatheSyncRequestMessage>(OnLatheSyncRequestMessage);
@@ -276,6 +277,11 @@ namespace Content.Server.Lathe
Dirty(component);
}
private void OnUpgradeExamine(EntityUid uid, LatheComponent component, UpgradeExamineEvent args)
{
args.AddPercentageUpgrade("lathe-component-upgrade-speed", 1 / component.TimeMultiplier);
args.AddPercentageUpgrade("lathe-component-upgrade-material-use", component.MaterialUseMultiplier);
}
protected override bool HasRecipe(EntityUid uid, LatheRecipePrototype recipe, LatheComponent component)
{