Skip to content

Commit

Permalink
I fixes prediction
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Aug 14, 2024
1 parent 78813de commit 7667542
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,15 @@ private void AddAll<T>(IEnumerable<InteractionVerbPrototype> verbs, GetVerbsEven
if (!isRequirementMet && proto.HideByRequirement)
continue;

var isAllowed = proto.Action?.IsAllowed(verbArgs, proto, _verbDependencies) == true;
// TODO: we skip this check since the client is not aware of actions. This should be changed, maybe make actions mixed server/client?
var isAllowed = proto.Action?.IsAllowed(verbArgs, proto, _verbDependencies) == true || _net.IsClient;
if (!isAllowed && proto.HideWhenInvalid)
continue;

var verb = factory.Invoke();
CopyVerbData(proto, verb);
verb.Disabled = isInvalid || !isRequirementMet || !isAllowed;
if (!verb.Disabled)
if (!verb.Disabled && !_net.IsClient)
verb.Act = () => StartVerb(proto, verbArgs);

args.Verbs.Add(verb);
Expand Down

0 comments on commit 7667542

Please sign in to comment.