Fix UseDelayComponent (#546)
Currently if this component is present the delay timer is started but it doesn't actually prevent use interactions. To test this bug, do the following: 1. Set the delay for [bike_horn](https://github.com/space-wizards/space-station-14/blob/master/Resources/Prototypes/Entities/items/bike_horn.yml#L25) to something large like 5.0 that'll make the effect obvious 2. Use the bike horn with the z key. The delay anim will play properly but you'll still be able to spam the honk.
This commit is contained in:
committed by
Pieter-Jan Briers
parent
86d1f808af
commit
1996893a26
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Content.Server.GameObjects.Components.Mobs;
|
||||
using Content.Server.GameObjects.Components.Timing;
|
||||
@@ -564,6 +564,9 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
if (used.TryGetComponent<UseDelayComponent>(out var delayComponent))
|
||||
{
|
||||
if(delayComponent.ActiveDelay)
|
||||
return;
|
||||
else
|
||||
delayComponent.BeginDelay();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user