Skip to content

ApiFeatures

public static class ApiFeatures

Namespace SideHustle

Added in 3.0.0

Feature names for API.Has. Ask for a feature instead of comparing version numbers: it says exactly what you need, and it stays true in every later release. Every name here is true on the Side Hustle that ships it. The constants are compiled into your mod, so pass them to Has; do not read them to learn what is running.

public const string HostSettings = "host-settings"

Added in 3.0.0

Host-configurable settings on the Host form (GamemodeDescriptor.HostSettings, MultiplayerInfo getters).

public const string Presets = "presets"

Added in 3.0.0

One-click presets for the host settings (GamemodeDescriptor.Presets).

public const string ModPolicy = "mod-policy"

Type: ModPolicy

Added in 3.0.0

Per-gamemode mod policy (GamemodeDescriptor.Policy).

public const string WorldHygieneFlags = "world-hygiene-flags"

Added in 3.0.0

The world hygiene flags on GamemodeDescriptor (quests, intro, saving, NPC combat, player death).

public const string KickPlayer = "kick-player"

Added in 3.0.0

API.KickPlayer.

public const string Validation = "validation"

Added in 3.0.0

Descriptor checks at API.Register, logged per field. Since 3.0.0.

public const string SessionEvents = "session-events"

Added in 3.0.0

API.Ready, API.SessionStarted, API.SessionEnded and API.CurrentSession. Since 3.0.0.

public const string SessionRole = "session-role"

Type: SessionRole

Added in 3.0.0

LaunchContext.Role and SessionRole. Since 3.0.0.

public const string Players = "players"

Added in 3.0.0

API.PlayerJoined, API.PlayerLeft and API.Players. Since 3.0.0.

public const string Notices = "notices"

Added in 3.0.0

API.ShowNotice. Since 3.0.0.

public const string Messages = "messages"

Added in 3.0.0

API.SendToAll, API.SendTo and API.OnMessage. Since 3.0.0.

public const string IconResource = "icon-resource"

Added in 3.0.0

GamemodeDescriptor.IconResource. Since 3.0.0.

public const string WorldHygienePresets = "world-hygiene-presets"

Added in 3.0.0

The WorldHygiene presets. Since 3.0.0.