Class MakerToolContext

Namespace
SurvivorsMaker.Editor
Assembly
SurvivorsMaker.Editor.dll

Content and settings lookups shared by the maker tool windows.

public static class MakerToolContext
Inheritance
MakerToolContext
Inherited Members

Methods

AllEnemies(ContentAsset)

Enemies the content lists, plus enemies reached through waves, hordes, summons and death spawns.

public static List<EnemyAsset> AllEnemies(ContentAsset content)

Parameters

content ContentAsset

Returns

List<EnemyAsset>

AllWeapons(ContentAsset)

Content weapons followed by their tier chains, without duplicates, in authored order.

public static List<WeaponAsset> AllWeapons(ContentAsset content)

Parameters

content ContentAsset

Returns

List<WeaponAsset>

DefaultContent(Object)

The selection when it is (or belongs to) a content asset, else the first content asset in the project.

public static ContentAsset DefaultContent(Object selection)

Parameters

selection Object

Returns

ContentAsset

DefaultSettings(ContentAsset, Object)

public static GameSettingsAsset DefaultSettings(ContentAsset content, Object selection = null)

Parameters

content ContentAsset
selection Object

Returns

GameSettingsAsset

FindWave(WaveAsset, out ContentAsset, out ArenaAsset, out int)

Finds a wave asset in the project's contents: content, arena and 1-based wave number.

public static bool FindWave(WaveAsset wave, out ContentAsset content, out ArenaAsset arena, out int waveNumber)

Parameters

wave WaveAsset
content ContentAsset
arena ArenaAsset
waveNumber int

Returns

bool

FirstArena(ContentAsset, out int)

First arena with waves (the one bot runs use by default).

public static ArenaAsset FirstArena(ContentAsset content, out int index)

Parameters

content ContentAsset
index int

Returns

ArenaAsset

Label(ContentAssetBase)

public static string Label(ContentAssetBase asset)

Parameters

asset ContentAssetBase

Returns

string

Ping(Object)

Pings and selects an asset in the Project window.

public static void Ping(Object asset)

Parameters

asset Object

References(ContentAsset, Object)

True when target is listed by the content directly, as a weapon tier, or as an arena wave.

public static bool References(ContentAsset content, Object target)

Parameters

content ContentAsset
target Object

Returns

bool

Snapshot(ContentAsset, GameSettingsAsset, ArenaAsset, int)

Snapshot that targets a specific arena asset of the content.

public static MakerSnapshot Snapshot(ContentAsset content, GameSettingsAsset settings, ArenaAsset arena, int difficulty)

Parameters

content ContentAsset
settings GameSettingsAsset
arena ArenaAsset
difficulty int

Returns

MakerSnapshot

Snapshot(ContentAsset, GameSettingsAsset, RunMode, int, uint, string, int)

Converts the assets into run definitions (copies of settings, cached content definitions) on the editor thread. Throws with a readable message when content or settings are missing.

public static MakerSnapshot Snapshot(ContentAsset content, GameSettingsAsset settings, RunMode mode = RunMode.Arena, int runs = 100, uint seed = 1, string bot = "Greedy", int difficulty = 0)

Parameters

content ContentAsset
settings GameSettingsAsset
mode RunMode
runs int
seed uint
bot string
difficulty int

Returns

MakerSnapshot

TierChain(WeaponAsset, IEnumerable<WeaponAsset>)

Tier chain starting at the lowest tier that leads to weapon.

public static List<WeaponAsset> TierChain(WeaponAsset weapon, IEnumerable<WeaponAsset> pool = null)

Parameters

weapon WeaponAsset
pool IEnumerable<WeaponAsset>

Returns

List<WeaponAsset>

WaveAt(ContentAsset, int)

The authoring asset of 1-based wave wave in the first arena with waves.

public static WaveAsset WaveAt(ContentAsset content, int wave)

Parameters

content ContentAsset
wave int

Returns

WaveAsset