Show / Hide Table of Contents

Class Finder

Inheritance
object
Finder
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: ItemChanger
Assembly: ItemChanger.dll
Syntax
public static class Finder

Properties

View Source

ItemNames

Declaration
public static IEnumerable<string> ItemNames { get; }
Property Value
Type Description
IEnumerable<string>
View Source

LocationNames

Declaration
public static IEnumerable<string> LocationNames { get; }
Property Value
Type Description
IEnumerable<string>

Methods

View Source

DefineCustomItem(AbstractItem)

Declaration
public static void DefineCustomItem(AbstractItem item)
Parameters
Type Name Description
AbstractItem item
View Source

DefineCustomLocation(AbstractLocation)

Declaration
public static void DefineCustomLocation(AbstractLocation loc)
Parameters
Type Name Description
AbstractLocation loc
View Source

DeserializeResource<T>(Assembly, string)

Declaration
public static T? DeserializeResource<T>(Assembly a, string resourcePath)
Parameters
Type Name Description
Assembly a
string resourcePath
Returns
Type Description
T
Type Parameters
Name Description
T
View Source

GetFullItemList()

Declaration
public static Dictionary<string, AbstractItem> GetFullItemList()
Returns
Type Description
Dictionary<string, AbstractItem>
View Source

GetFullLocationList()

Declaration
public static Dictionary<string, AbstractLocation> GetFullLocationList()
Returns
Type Description
Dictionary<string, AbstractLocation>
View Source

GetItem(string)

The most general method for looking up an item. Invokes an event to allow subscribers to modify the search result. Return value defaults to that of GetItemInternal.

Declaration
public static AbstractItem? GetItem(string name)
Parameters
Type Name Description
string name
Returns
Type Description
AbstractItem
View Source

GetItemFromSheet(string, IEnumerable<int>)

Searches for the item by name among the requested sheets, and returns a clone of the item from the first sheet with a match. Returns null if the item was not found.

Declaration
public static AbstractItem? GetItemFromSheet(string name, IEnumerable<int> sheets)
Parameters
Type Name Description
string name
IEnumerable<int> sheets
Returns
Type Description
AbstractItem
View Source

GetItemFromSheet(string, int)

Finds the itme by name in the sheet with the requested index, and returns a clone of the item. Returns null if the item was not found.

Declaration
public static AbstractItem? GetItemFromSheet(string name, int sheet)
Parameters
Type Name Description
string name
int sheet
Returns
Type Description
AbstractItem
View Source

GetItemInternal(string)

Searches for the item by name, first in the CustomItems list, then in the list of extra sheets held by GlobalSettings, and finally in the default item sheet. Returns null if not found.

Declaration
public static AbstractItem? GetItemInternal(string name)
Parameters
Type Name Description
string name
Returns
Type Description
AbstractItem
View Source

GetItemList(int)

Declaration
public static Dictionary<string, AbstractItem> GetItemList(int id)
Parameters
Type Name Description
int id
Returns
Type Description
Dictionary<string, AbstractItem>
View Source

GetItemLists()

Declaration
public static Dictionary<string, AbstractItem>[] GetItemLists()
Returns
Type Description
Dictionary<string, AbstractItem>[]
View Source

GetLocation(string)

The most general method for looking up a location. Invokes an event to allow subscribers to modify the search result. Return value defaults to that of GetLocationInternal.

Declaration
public static AbstractLocation? GetLocation(string name)
Parameters
Type Name Description
string name
Returns
Type Description
AbstractLocation
View Source

GetLocationFromSheet(string, IEnumerable<int>)

Searches for the location by name among the requested sheets, and returns a clone of the location from the first sheet with a match. Returns null if the location was not found.

Declaration
public static AbstractLocation? GetLocationFromSheet(string name, IEnumerable<int> sheets)
Parameters
Type Name Description
string name
IEnumerable<int> sheets
Returns
Type Description
AbstractLocation
View Source

GetLocationFromSheet(string, int)

Finds the location by name in the sheet with the requested index, and returns a clone of the location. Returns null if the location was not found.

Declaration
public static AbstractLocation? GetLocationFromSheet(string name, int sheet)
Parameters
Type Name Description
string name
int sheet
Returns
Type Description
AbstractLocation
View Source

GetLocationInternal(string)

Searches for the location by name, first in the CustomLocations list, then in the list of extra sheets held by GlobalSettings, and finally in the default location sheet. Returns null if not found.

Declaration
public static AbstractLocation? GetLocationInternal(string name)
Parameters
Type Name Description
string name
Returns
Type Description
AbstractLocation
View Source

GetLocationList(int)

Declaration
public static Dictionary<string, AbstractLocation> GetLocationList(int id)
Parameters
Type Name Description
int id
Returns
Type Description
Dictionary<string, AbstractLocation>
View Source

GetLocationLists()

Declaration
public static Dictionary<string, AbstractLocation>[] GetLocationLists()
Returns
Type Description
Dictionary<string, AbstractLocation>[]
View Source

Load()

Declaration
public static void Load()
View Source

Serialize(string, object)

Declaration
public static void Serialize(string filename, object o)
Parameters
Type Name Description
string filename
object o
View Source

UndefineCustomItem(string)

Declaration
public static bool UndefineCustomItem(string name)
Parameters
Type Name Description
string name
Returns
Type Description
bool
View Source

UndefineCustomLocation(string)

Declaration
public static bool UndefineCustomLocation(string name)
Parameters
Type Name Description
string name
Returns
Type Description
bool

Events

View Source

GetItemOverride

Invoked by Finder.GetItem. The initial arguments are the requested name, and null. If the event finishes with a non-null item, that item is returned to the requester.
Otherwise, the ItemChanger internal implementation of that item is cloned and returned, if it exists. Otherwise, null is returned.

Declaration
public static event Action<GetItemEventArgs>? GetItemOverride
Event Type
Type Description
Action<GetItemEventArgs>
View Source

GetLocationOverride

Invoked by Finder.GetLocation. The initial arguments are the requested name, and null. If the event finishes with a non-null location, that location is returned to the requester.
Otherwise, the ItemChanger internal implementation of that location is cloned and returned, if it exists. Otherwise, null is returned.

Declaration
public static event Action<GetLocationEventArgs>? GetLocationOverride
Event Type
Type Description
Action<GetLocationEventArgs>
  • View Source
In this article
Back to top Generated by DocFX