From: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Date: Sat, 30 Aug 2025 23:35:22 +0000 (+0200) Subject: Nullable messydrinker tag (#40002) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=c89b20b19f27a7bb62ade8de9a0617f259ab2995;p=space-station-14.git Nullable messydrinker tag (#40002) init --- diff --git a/Content.Shared/Nutrition/Components/MessyDrinkerComponent.cs b/Content.Shared/Nutrition/Components/MessyDrinkerComponent.cs index ea145019c2..1134272799 100644 --- a/Content.Shared/Nutrition/Components/MessyDrinkerComponent.cs +++ b/Content.Shared/Nutrition/Components/MessyDrinkerComponent.cs @@ -32,7 +32,7 @@ public sealed partial class MessyDrinkerComponent : Component /// For example, a spill-immune bottle. /// [DataField, AutoNetworkedField] - public ProtoId SpillImmuneTag = "MessyDrinkerImmune"; + public ProtoId? SpillImmuneTag = "MessyDrinkerImmune"; [DataField, AutoNetworkedField] public LocId? SpillMessagePopup; diff --git a/Content.Shared/Nutrition/EntitySystems/MessyDrinkerSystem.cs b/Content.Shared/Nutrition/EntitySystems/MessyDrinkerSystem.cs index d75e7bf018..7bfb7a5633 100644 --- a/Content.Shared/Nutrition/EntitySystems/MessyDrinkerSystem.cs +++ b/Content.Shared/Nutrition/EntitySystems/MessyDrinkerSystem.cs @@ -25,7 +25,7 @@ public sealed class MessyDrinkerSystem : EntitySystem private void OnIngested(Entity ent, ref IngestingEvent ev) { - if (_tag.HasTag(ev.Food, ent.Comp.SpillImmuneTag)) + if (ent.Comp.SpillImmuneTag != null && _tag.HasTag(ev.Food, ent.Comp.SpillImmuneTag.Value)) return; // Cannot spill if you're being forced to drink.