Machine upgrade examine verb (#12119)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user