Class RunController

Namespace
SurvivorsMaker.Run
Assembly
SurvivorsMaker.Run.dll

Explicit run actions with phase validation before any state changes or random draws.

public sealed class RunController : IPlaytestCommands
Inheritance
RunController
Implements
Inherited Members
Extension Methods

Constructors

RunController(RunSystems)

public RunController(RunSystems systems)

Parameters

systems RunSystems

Fields

PickupRules

Optional pickup/death-reward rules for subsequently started waves.

public PickupRules PickupRules

Field Value

PickupRules

RunTriggerHandlers

public readonly Dictionary<string, IRunTriggerHandler> RunTriggerHandlers

Field Value

Dictionary<string, IRunTriggerHandler>

TriggerHandlers

public readonly Dictionary<string, ITriggerHandler> TriggerHandlers

Field Value

Dictionary<string, ITriggerHandler>

Properties

NewUnlocks

public IReadOnlyList<UnlockDef> NewUnlocks { get; }

Property Value

IReadOnlyList<UnlockDef>

Profile

public ProfileState Profile { get; }

Property Value

ProfileState

State

public RunState State { get; }

Property Value

RunState

UsedCheats

public bool UsedCheats { get; }

Property Value

bool

Methods

Banish(int)

public RunResult Banish(int slot)

Parameters

slot int

Returns

RunResult

BanishChoice(int)

public RunResult BanishChoice(int index)

Parameters

index int

Returns

RunResult

Buy(int)

Requests the buy operation through the active run rules; invalid calls return a result without changing state.

public RunResult Buy(int slot)

Parameters

slot int

Returns

RunResult

CaptureEnvelope(long, string)

public SaveEnvelope CaptureEnvelope(long generation = 0, string owner = "")

Parameters

generation long
owner string

Returns

SaveEnvelope

ChooseLevelUp(int)

public RunResult ChooseLevelUp(int index)

Parameters

index int

Returns

RunResult

CompleteWave()

public RunResult CompleteWave()

Returns

RunResult

ConfigureProfile(IProfileStore, RunContent)

Call before displaying available characters/weapons in the menu.

public void ConfigureProfile(IProfileStore store, RunContent content = null)

Parameters

store IProfileStore
content RunContent

ConfigureRunStore(IRunStore)

New adapters store run payloads independently; the old profile store remains compatible.

public void ConfigureRunStore(IRunStore store)

Parameters

store IRunStore

Create(RunRequest)

public RunState Create(RunRequest request)

Parameters

request RunRequest

Returns

RunState

EndWave()

During a wave: ends it as survived.

public RunResult EndWave()

Returns

RunResult

GiveCurrency(int)

public RunResult GiveCurrency(int amount)

Parameters

amount int

Returns

RunResult

GiveItem(string)

Between waves or in field mode during a wave: adds an item or upgrade by id.

public RunResult GiveItem(string itemId)

Parameters

itemId string

Returns

RunResult

GiveLevels(int)

Gains levels now (pending level-ups as usual).

public RunResult GiveLevels(int levels)

Parameters

levels int

Returns

RunResult

GiveWeapon(string)

Between waves: adds a weapon (by item id) to a free slot.

public RunResult GiveWeapon(string weaponId)

Parameters

weaponId string

Returns

RunResult

Load(RunSnapshot)

public RunResult Load(RunSnapshot snapshot)

Parameters

snapshot RunSnapshot

Returns

RunResult

Load(RunSnapshot, RunRequest)

public RunResult Load(RunSnapshot snapshot, RunRequest request)

Parameters

snapshot RunSnapshot
request RunRequest

Returns

RunResult

Load(SaveEnvelope, RunRequest, SaveMigrationRegistry)

public RunResult Load(SaveEnvelope envelope, RunRequest request, SaveMigrationRegistry migrations)

Parameters

envelope SaveEnvelope
request RunRequest
migrations SaveMigrationRegistry

Returns

RunResult

Lock(int)

public RunResult Lock(int slot)

Parameters

slot int

Returns

RunResult

Merge(int)

Requests the merge operation through the active run rules; invalid calls return a result without changing state.

public RunResult Merge(int weaponIndex)

Parameters

weaponIndex int

Returns

RunResult

NextWave()

public RunResult NextWave()

Returns

RunResult

Recycle(int)

Requests the recycle operation through the active run rules; invalid calls return a result without changing state.

public RunResult Recycle(int weaponIndex)

Parameters

weaponIndex int

Returns

RunResult

Reroll()

Requests the reroll operation through the active run rules; invalid calls return a result without changing state.

public RunResult Reroll()

Returns

RunResult

Save()

public RunSnapshot Save()

Returns

RunSnapshot

SetInvulnerable(bool)

During a wave: player takes no damage while on.

public RunResult SetInvulnerable(bool on)

Parameters

True bool

Returns

RunResult

SkipToWave(int)

Between waves: the next wave started is wave (1-based).

public RunResult SkipToWave(int wave)

Parameters

wave int

Returns

RunResult

SpawnEnemies(string, int)

During a wave: spawns count of an enemy id around the player now (bypasses telegraph and capacity).

public RunResult SpawnEnemies(string enemyId, int count)

Parameters

enemyId string
count int

Returns

RunResult

StartWave()

public RunResult StartWave()

Returns

RunResult

Step(Vec2)

public RunResult Step(Vec2 input)

Parameters

input Vec2

Returns

RunResult

ToggleLock(int)

Requests the toggle lock operation through the active run rules; invalid calls return a result without changing state.

public RunResult ToggleLock(int slot)

Parameters

slot int

Returns

RunResult