Class Finder
Inheritance
System.Object
Finder
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: ItemChanger.dll
Syntax
public static class Finder
Properties
|
Improve this Doc
View Source
ItemNames
Declaration
public static IEnumerable<string> ItemNames { get; }
Property Value
Type |
Description |
IEnumerable<System.String> |
|
|
Improve this Doc
View Source
LocationNames
Declaration
public static IEnumerable<string> LocationNames { get; }
Property Value
Type |
Description |
IEnumerable<System.String> |
|
Methods
|
Improve this Doc
View Source
DefineCustomItem(AbstractItem)
Declaration
public static void DefineCustomItem(AbstractItem item)
Parameters
|
Improve this Doc
View Source
DefineCustomLocation(AbstractLocation)
Declaration
public static void DefineCustomLocation(AbstractLocation loc)
Parameters
|
Improve this Doc
View Source
DeserializeResource<T>(Assembly, String)
Declaration
public static T DeserializeResource<T>(Assembly a, string resourcePath)
Parameters
Type |
Name |
Description |
System.Reflection.Assembly |
a |
|
System.String |
resourcePath |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetFullItemList()
Declaration
public static Dictionary<string, AbstractItem> GetFullItemList()
Returns
|
Improve this Doc
View Source
GetFullLocationList()
Declaration
public static Dictionary<string, AbstractLocation> GetFullLocationList()
Returns
|
Improve this Doc
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 |
System.String |
name |
|
Returns
|
Improve this Doc
View Source
GetItemFromSheet(String, IEnumerable<Int32>)
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 |
System.String |
name |
|
IEnumerable<System.Int32> |
sheets |
|
Returns
|
Improve this Doc
View Source
GetItemFromSheet(String, Int32)
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 |
System.String |
name |
|
System.Int32 |
sheet |
|
Returns
|
Improve this Doc
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 |
System.String |
name |
|
Returns
|
Improve this Doc
View Source
GetItemList(Int32)
Declaration
public static Dictionary<string, AbstractItem> GetItemList(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
|
Improve this Doc
View Source
GetItemLists()
Declaration
public static Dictionary<string, AbstractItem>[] GetItemLists()
Returns
|
Improve this Doc
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 |
System.String |
name |
|
Returns
|
Improve this Doc
View Source
GetLocationFromSheet(String, IEnumerable<Int32>)
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 |
System.String |
name |
|
IEnumerable<System.Int32> |
sheets |
|
Returns
|
Improve this Doc
View Source
GetLocationFromSheet(String, Int32)
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 |
System.String |
name |
|
System.Int32 |
sheet |
|
Returns
|
Improve this Doc
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 |
System.String |
name |
|
Returns
|
Improve this Doc
View Source
GetLocationList(Int32)
Declaration
public static Dictionary<string, AbstractLocation> GetLocationList(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
|
Improve this Doc
View Source
GetLocationLists()
Declaration
public static Dictionary<string, AbstractLocation>[] GetLocationLists()
Returns
|
Improve this Doc
View Source
Load()
Declaration
public static void Load()
|
Improve this Doc
View Source
Serialize(String, Object)
Declaration
public static void Serialize(string filename, object o)
Parameters
Type |
Name |
Description |
System.String |
filename |
|
System.Object |
o |
|
|
Improve this Doc
View Source
UndefineCustomItem(String)
Declaration
public static bool UndefineCustomItem(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
UndefineCustomLocation(String)
Declaration
public static bool UndefineCustomLocation(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Boolean |
|
Events
|
Improve this Doc
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
|
Improve this Doc
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