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(citizen-server-impl): add the ability to restart categories for command: restart #3237

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Kid-Sander
Copy link

@Kid-Sander Kid-Sander commented Mar 13, 2025

Goal of this PR

Add the ability to restart categories for command: restart
...

How is this PR achieving the goal

Added ability to use: “restart [resourceCategory]” like start/stop. Also added a new variation of “restart [resourceCategory] [isPrintStoppedResource]” to avoid the situation where a category may contain a resource that is not running. All other behavioral logic remains the same.

image
...

This PR applies to the following area(s)

FiveM, RedM, Server
...

Successfully tested on

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

Corrected file: ServerResources.cpp.
The changes concern the restart command, namely adding the ability to restart categories, as with the start/stop commands.
…nsole.

A variation of the command was added: restart [resourceName] [isPrintStopedResource]. This allows you to remove the message “Can't restart a stopped resource.” from the display. This message was appearing when a category was restarted and it contained stopped resources. All other logic of the command has not changed.
@github-actions github-actions bot added the RedM Issues/PRs related to RedM label Mar 13, 2025
@STACHY225
Copy link

You've got typo in isPrintStopedResource, in 2nd commit (Stopped is missing double p).

Minor change to correct a typo in the word: “isPrintStoppedResource”
@github-actions github-actions bot added the triage Needs a preliminary assessment to determine the urgency and required action label Mar 13, 2025
@Kid-Sander
Copy link
Author

You've got typo in isPrintStopedResource, in 2nd commit (Stopped is missing double p).

Thank you for the observation. The typo has been corrected.

@prikolium-cfx
Copy link
Collaborator

Thank you for the contribution. We would like to not add additional complexity to resource manager system so I want to ask you to remove this additional argument and just do print something like Skipping resource resource_name restart as it is not started.

@Kid-Sander
Copy link
Author

Thanks for the review. Returned the standard behavior, when restarting one or more resources, only by changing the old message to a new one, which contains specifics about what resource was trying to restart now.

An example of this message can be seen on the screenshot in the attachment.
image

@github-actions github-actions bot added invalid Requires changes before it's considered valid and can be (re)triaged and removed triage Needs a preliminary assessment to determine the urgency and required action labels Mar 21, 2025
@github-actions github-actions bot added triage Needs a preliminary assessment to determine the urgency and required action and removed invalid Requires changes before it's considered valid and can be (re)triaged labels Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RedM Issues/PRs related to RedM triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants