Fix cleanbots (#16922)
This commit is contained in:
@@ -4,6 +4,7 @@ using Content.Server.Interaction;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Interaction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.NPC;
|
||||
@@ -60,6 +61,7 @@ public sealed class NPCBlackboard : IEnumerable<KeyValuePair<string, object>>
|
||||
return dict;
|
||||
}
|
||||
|
||||
[Pure]
|
||||
public bool ContainsKey(string key)
|
||||
{
|
||||
return _blackboard.ContainsKey(key);
|
||||
@@ -68,6 +70,7 @@ public sealed class NPCBlackboard : IEnumerable<KeyValuePair<string, object>>
|
||||
/// <summary>
|
||||
/// Get the blackboard data for a particular key.
|
||||
/// </summary>
|
||||
[Pure]
|
||||
public T GetValue<T>(string key)
|
||||
{
|
||||
return (T) _blackboard[key];
|
||||
@@ -76,6 +79,7 @@ public sealed class NPCBlackboard : IEnumerable<KeyValuePair<string, object>>
|
||||
/// <summary>
|
||||
/// Tries to get the blackboard data for a particular key. Returns default if not found
|
||||
/// </summary>
|
||||
[Pure]
|
||||
public T? GetValueOrDefault<T>(string key, IEntityManager entManager)
|
||||
{
|
||||
if (_blackboard.TryGetValue(key, out var value))
|
||||
|
||||
Reference in New Issue
Block a user