Skip to content

Commit

Permalink
Oops
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Aug 31, 2024
1 parent 17c836f commit f2bc2e4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Content.Server/FloofStation/Traits/VampirismSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Server.Body.Components;
using Content.Server.Floofstation.Traits.Components;
using Content.Server.Vampiric;
using Content.Shared.Body.Components;
using Content.Shared.Body.Systems;

namespace Content.Server.Floofstation.Traits;
Expand All @@ -18,13 +19,10 @@ private void OnInitVampire(Entity<VampirismComponent> ent, ref MapInitEvent args
{
EnsureBloodSucker(ent);

Log.Info($"Init vampire: {ent.Owner}");

if (!_body.TryGetBodyOrganComponents<MetabolizerComponent>(ent, out var comps))
if (!TryComp<BodyComponent>(ent, out var body)
|| !_body.TryGetBodyOrganComponents<MetabolizerComponent>(ent, out var comps, body))
return;

Log.Info($"Init vampire: {ent.Owner}");

foreach (var (metabolizer, organ) in comps)
{
if (!TryComp<StomachComponent>(organ.Owner, out var stomach))
Expand Down

0 comments on commit f2bc2e4

Please sign in to comment.