C1984 (C4 nerf) (#7612)
This commit is contained in:
@@ -16,6 +16,13 @@ public sealed class StickyComponent : Component
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public EntityWhitelist? Whitelist;
|
||||
|
||||
/// <summary>
|
||||
/// What target entities can't be used as surface for sticky entity.
|
||||
/// </summary>
|
||||
[DataField("blacklist")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public EntityWhitelist? Blacklist;
|
||||
|
||||
/// <summary>
|
||||
/// How much time does it take to stick entity to target.
|
||||
/// If zero will stick entity immediately.
|
||||
|
||||
@@ -55,8 +55,12 @@ public sealed class StickySystem : EntitySystem
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
return false;
|
||||
|
||||
// check whitelist and blacklist
|
||||
if (component.Whitelist != null && !component.Whitelist.IsValid(target))
|
||||
return false;
|
||||
if (component.Blacklist != null && component.Blacklist.IsValid(target))
|
||||
return false;
|
||||
|
||||
// check if delay is not zero to start do after
|
||||
var delay = (float) component.StickDelay.TotalSeconds;
|
||||
|
||||
Reference in New Issue
Block a user