Skip to content

Game.EndFrameBarrier

Assembly: Game
Namespace: Game.Modding.Toolchain.Dependencies

Type: class IDEDependency

Base: CombinedDependency

Summary: IDEDependency is a CombinedDependency implementation that aggregates several IDE-specific dependencies (Visual Studio, Rider, VS Code) and exposes them as a single OR-combined toolchain dependency. It is used by the toolchain/modding system to detect which supported IDEs are present (and whether they meet minimum version requirements) and to present a localized state string describing detected IDEs. This dependency is asynchronous (isAsync = true) and cannot be installed or uninstalled via the toolchain (canBeInstalled/canBeUninstalled are false).


Fields

  • private BaseIDEDependency[] ides = new BaseIDEDependency[3] { new VisualStudioDependency(), new RiderDependency(), new VSCodeDependency() } This array holds the concrete IDE dependency implementations that IDEDependency combines. Each element represents detection logic for a specific IDE and can indicate whether the detected IDE meets the minimum required version (via isMinVersion) and provides a localizedName used when building user-facing messages.

Properties

  • public override IEnumerable<IToolchainDependency> dependencies => ides Returns the underlying dependencies (the ides array) that are combined by this CombinedDependency.

  • public override CombineType type => CombineType.OR Specifies that the combined dependency uses logical OR: the combined dependency is satisfied if any of the contained IDE dependencies is satisfied.

  • protected override bool isAsync => true Indicates that this dependency performs asynchronous detection (presumably it may run checks that complete later).

  • public override bool canBeInstalled => false This dependency cannot be installed via the toolchain; it only reports detection state.

  • public override bool canBeUninstalled => false This dependency cannot be uninstalled via the toolchain.

Constructors

  • public IDEDependency() No explicit constructor is declared in source; the default constructor initializes the ides array with VisualStudioDependency, RiderDependency and VSCodeDependency instances as shown in the field initializer.

Methods

  • public override LocalizedString GetLocalizedState(bool includeProgress) Overrides the base implementation to provide a more descriptive localized status for the combined IDE dependency. Behavior:
  • If base.state.m_State == DependencyState.Installed:
    • Builds a dictionary of localization elements where "STATE" maps to a localized "Detected" label.
    • Iterates the ides array and for each BaseIDEDependency with isMinVersion == true, adds an item entry that references that dependency's localizedName.
    • Returns a LocalizedString combining the "STATE" token and a parenthesized, comma-separated list of the detected IDE names (using the dictionary tokens).
  • If the state is DependencyState.NotInstalled:
    • Returns a localized "NotDetected" string.
  • For other states:
    • Falls back to base.GetLocalizedState(includeProgress).

This method is responsible for producing the user-facing, localized description that may read like: "Detected (Visual Studio 2022, Rider, VS Code)" depending on which IDEs meet the minimum version requirement.

Usage Example

// Create the combined IDE dependency and get a localized status string.
IDEDependency ideDep = new IDEDependency();
LocalizedString status = ideDep.GetLocalizedState(includeProgress: false);

// Example of enumerating the underlying dependencies:
foreach (var dep in ideDep.dependencies)
{
    // dep is an IToolchainDependency (e.g., VisualStudioDependency, RiderDependency, VSCodeDependency)
    // You can inspect dep.state, dep.localizedName, etc., depending on the interface/implementation.
}