From 7d0adc2dfc6c916fbb5c72e1c40a15173737f1ba Mon Sep 17 00:00:00 2001 From: fishbait Date: Thu, 28 Nov 2024 17:39:30 +0100 Subject: [PATCH 1/2] no more free chem change for bloba ran into a bug where changing the chem type chud be done whitout paying for it. Now it checks and aborts if you dont have enuf points to do the change. --- Content.Server/Backmen/Blob/BlobObserverSystem.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Content.Server/Backmen/Blob/BlobObserverSystem.cs b/Content.Server/Backmen/Blob/BlobObserverSystem.cs index 2dc417bd821..b7a11fdedf9 100644 --- a/Content.Server/Backmen/Blob/BlobObserverSystem.cs +++ b/Content.Server/Backmen/Blob/BlobObserverSystem.cs @@ -206,14 +206,15 @@ private void OnChemSelected(EntityUid uid, BlobObserverComponent component, Blob { if (component.Core == null || !TryComp(component.Core.Value, out var blobCoreComponent)) return; - + + if (!_blobCoreSystem.TryUseAbility(component.Core.Value, blobCoreComponent.SwapChemCost)) + return; + if (component.SelectedChemId == args.SelectedId) return; if (!ChangeChem(uid, args.SelectedId, component)) return; - - _blobCoreSystem.TryUseAbility(component.Core.Value, blobCoreComponent.SwapChemCost); } private bool ChangeChem(EntityUid uid, BlobChemType newChem, BlobObserverComponent component) From 3b1442965b7e8fd83dba7795a459a70ce189dfec Mon Sep 17 00:00:00 2001 From: fishbait Date: Thu, 28 Nov 2024 20:46:18 +0100 Subject: [PATCH 2/2] Update BlobObserverSystem.cs --- Content.Server/Backmen/Blob/BlobObserverSystem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Server/Backmen/Blob/BlobObserverSystem.cs b/Content.Server/Backmen/Blob/BlobObserverSystem.cs index b7a11fdedf9..0051bef22a2 100644 --- a/Content.Server/Backmen/Blob/BlobObserverSystem.cs +++ b/Content.Server/Backmen/Blob/BlobObserverSystem.cs @@ -206,12 +206,12 @@ private void OnChemSelected(EntityUid uid, BlobObserverComponent component, Blob { if (component.Core == null || !TryComp(component.Core.Value, out var blobCoreComponent)) return; - - if (!_blobCoreSystem.TryUseAbility(component.Core.Value, blobCoreComponent.SwapChemCost)) - return; if (component.SelectedChemId == args.SelectedId) return; + + if (!_blobCoreSystem.TryUseAbility(component.Core.Value, blobCoreComponent.SwapChemCost)) + return; if (!ChangeChem(uid, args.SelectedId, component)) return;