@@ -32,7 +32,7 @@ public sealed partial class MessyDrinkerComponent : Component
|
|||||||
/// For example, a spill-immune bottle.
|
/// For example, a spill-immune bottle.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField, AutoNetworkedField]
|
[DataField, AutoNetworkedField]
|
||||||
public ProtoId<TagPrototype> SpillImmuneTag = "MessyDrinkerImmune";
|
public ProtoId<TagPrototype>? SpillImmuneTag = "MessyDrinkerImmune";
|
||||||
|
|
||||||
[DataField, AutoNetworkedField]
|
[DataField, AutoNetworkedField]
|
||||||
public LocId? SpillMessagePopup;
|
public LocId? SpillMessagePopup;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public sealed class MessyDrinkerSystem : EntitySystem
|
|||||||
|
|
||||||
private void OnIngested(Entity<MessyDrinkerComponent> ent, ref IngestingEvent ev)
|
private void OnIngested(Entity<MessyDrinkerComponent> 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;
|
return;
|
||||||
|
|
||||||
// Cannot spill if you're being forced to drink.
|
// Cannot spill if you're being forced to drink.
|
||||||
|
|||||||
Reference in New Issue
Block a user