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

Separate CCVars into separate files #33268

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

Simyon264
Copy link
Contributor

@Simyon264 Simyon264 commented Nov 12, 2024

About the PR

This PR separates the CCVars file into a partial class with multiple files in order to make them actually readable. This will make adding new CVars much easier.

Technical details

moved stuff

Requirements

Breaking changes

The file CCVars was split up into many tiny files. Downstreams are encouraged to create a new CVar class for their own fork in order to avoid merge conflicts as such:

namespace Content.Shared.MyAwesomeFork.CCVar;

[CVarDefs]
public sealed partial class MyAwesomeForkCCVars : CVars
{
    /// <summary>
    /// If true, makes people sell their souls on connection.
    /// </summary>
    public static readonly CVarDef<bool> GameAwesomeForkSellSoulOnJoin =
        CVarDef.Create("game.awesome_fork.sell_soul_on_join", true, CVar.SERVERONLY);
}

@TheShuEd
Copy link
Member

TheShuEd commented Nov 12, 2024

Its really helpful for forks and ccvar management

@VasilisThePikachu
Copy link
Member

Before merging mind if you make a PR to update the hosting docs (or really any doc pointing to ccvars)

I can also do this but I'm not promising anything so it may be faster for you to do docs pr as well.

@Simyon264
Copy link
Contributor Author

space-wizards/docs#345

@VasilisThePikachu VasilisThePikachu merged commit 6f7066e into space-wizards:master Nov 13, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants