Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mono-v2): disallow KeyMap to be used on RedM #2464

Merged
merged 1 commit into from
Apr 26, 2024
Merged
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
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
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved
// 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 @@ -273,7 +273,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
Loading