Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OpenDreamClient/Interface/Controls/ControlInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void RefreshVerbs(IEnumerable<(int, ClientObjectReference, VerbSystem.Ver
verbButton.Label.FontColorOverride = _textColor;
verbButton.StyleBoxOverride = new StyleBoxEmpty();

verbButton.OnPressed += _ => {
verbButton.OnButtonDown += _ => {
_verbSystem?.ExecuteVerb(src, verbId);
};

Expand Down
8 changes: 7 additions & 1 deletion OpenDreamClient/Rendering/ClientAppearanceSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public int GetAnimationFrame(IGameTiming gameTiming) {
private readonly Dictionary<(int X, int Y, int Z), Flick> _turfFlicks = new();
private readonly Dictionary<EntityUid, Flick> _movableFlicks = new();
private bool _receivedAllAppearancesMsg;
private float _refreshVerbRemainingTime = 0.5f;
private readonly float _refreshVerbPeriod = 0.5f;

[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IDreamResourceManager _dreamResourceManager = default!;
Expand Down Expand Up @@ -101,7 +103,11 @@ public override void Update(float frameTime) {
_movableFlicks.Remove(flickKey);
}

_verbSystem.RefreshVerbs();
_refreshVerbRemainingTime -= frameTime;
if (_refreshVerbRemainingTime < 0) {
_refreshVerbRemainingTime = _refreshVerbPeriod;
_verbSystem.RefreshVerbs();
}
}

public void SetAllAppearances(Dictionary<uint, ImmutableAppearance> appearances) {
Expand Down
Loading