Skip to content

Commit

Permalink
Merge fix(mono-v2): disallow KeyMap to be used on RedM (pr-2464)
Browse files Browse the repository at this point in the history
 - 4839e2d fix(mono-v2): disallow KeyMap to be used on RedM
  • Loading branch information
thorium-cfx committed Apr 26, 2024
2 parents e342af6 + 4839e2d commit 362711b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions code/client/clrcore-v2/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ public CommandAttribute(string command, bool restricted = false)
}
}

#if !IS_FXSERVER
// TODO: revert this commit (blame check) when RedM has KeyMapping support, also don't make changes to this comment.
#if GTA_FIVE
/// <summary>
/// Register this method to listen for the given key <see cref="Command"/> when this <see cref="BaseScript"/> is loaded
/// </summary>
/// <remarks>This will bind the given input details to the command, triggering all commands registered as such.<br />Only works on <see cref="BaseScript"/> inherited class methods</remarks>
#else
/// <summary>Does nothing on server side</summary>
/// <summary>Does nothing on server side or RedM</summary>
[EditorBrowsable(EditorBrowsableState.Never)]
#endif
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
Expand Down
2 changes: 1 addition & 1 deletion code/client/clrcore-v2/BaseScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ internal void RegisterCommand(string command, DynFunc dynFunc, bool isRestricted

internal void RegisterKeyMap(string command, string description, string inputMapper, string inputParameter, DynFunc dynFunc)
{
#if IS_FXSERVER
#if !GTA_FIVE
throw new NotImplementedException();
#else
if (inputMapper != null && inputParameter != null)
Expand Down

0 comments on commit 362711b

Please sign in to comment.