C# 클래스 ALFA.ResourceManager

This class implements a resource loader that is compatible with the game's internal resource loader. It can be used to load up files out of the currently loaded module, haks, or game data zip files.
파일 보기 프로젝트 열기: ALandFarAway/ALFA-Base-Resources 1 사용 예제들

공개 메소드들

메소드 설명
GetAllResources ( ) : IEnumerable

Get a list of all resources.

GetResource ( OEIResRef ResRef, ushort ResType ) : IResourceEntry

Get a resource by name.

GetResource ( string ResRef, ushort ResType ) : IResourceEntry

Get a resource by name.

GetResourcesByType ( ushort ResType ) : IEnumerable

Get a list of all resources of a given type. Duplicates may exist in the returned list, but the list is ordered in priority order, with the first entry being the most precedent for a given name.

LoadCoreResources ( ) : void

Initiate a load of core module resources only (no haks or zips). The load must be initiated before any resources are requested.

OpenGffResource ( string ResRef, ushort ResType ) : GFFFile

Open a GFF resource by name.

OpenModuleIfo ( ) : GFFFile

This method opens module.ifo for read as a GFF reader.

OpenTwoDAResource ( string ResRef, ushort ResType ) : TwoDAFile

Open a 2DA resource by name

ResourceManager ( string ModuleResName ) : System

Create a new ResourceManager instance.

비공개 메소드들

메소드 설명
AddModuleCampaign ( GFFFile ModuleIfo, string HomeDirectory, string InstallDirectory ) : void

This routine scans module.ifo for a campaign GUID. If found, a campaign.cam file with the same GUID is searched for and its containing directory is added to the directory resource list.

AddModuleHaks ( GFFFile ModuleIfo, string HomeDirectory, string InstallDirectory ) : void

This routine scans module.ifo for haks to add to the hak list.

LoadResourceRepositories ( ) : void

This method performs demand loading of resource repositories.

LoadResourceRepositories ( bool ModuleOnly ) : void

This method performs demand loading of resource repositories.

메소드 상세

GetAllResources() 공개 메소드

Get a list of all resources.
public GetAllResources ( ) : IEnumerable
리턴 IEnumerable

GetResource() 공개 메소드

Get a resource by name.
public GetResource ( OEIResRef ResRef, ushort ResType ) : IResourceEntry
ResRef OEIResRef Supplies the resref to open.
ResType ushort Supplies the restype code of the resource.
리턴 IResourceEntry

GetResource() 공개 메소드

Get a resource by name.
public GetResource ( string ResRef, ushort ResType ) : IResourceEntry
ResRef string Supplies the resref to open.
ResType ushort Supplies the restype code of the resource.
리턴 IResourceEntry

GetResourcesByType() 공개 메소드

Get a list of all resources of a given type. Duplicates may exist in the returned list, but the list is ordered in priority order, with the first entry being the most precedent for a given name.
public GetResourcesByType ( ushort ResType ) : IEnumerable
ResType ushort Supplies the resource type to search for.
리턴 IEnumerable

LoadCoreResources() 공개 메소드

Initiate a load of core module resources only (no haks or zips). The load must be initiated before any resources are requested.
public LoadCoreResources ( ) : void
리턴 void

OpenGffResource() 공개 메소드

Open a GFF resource by name.
public OpenGffResource ( string ResRef, ushort ResType ) : GFFFile
ResRef string Supplies the resref to open.
ResType ushort Supplies the restype code of the resource.
리턴 GFFFile

OpenModuleIfo() 공개 메소드

This method opens module.ifo for read as a GFF reader.
public OpenModuleIfo ( ) : GFFFile
리턴 GFFFile

OpenTwoDAResource() 공개 메소드

Open a 2DA resource by name
public OpenTwoDAResource ( string ResRef, ushort ResType ) : TwoDAFile
ResRef string Supplies the resref to open
ResType ushort Supplies the restype code of the resource
리턴 TwoDAFile

ResourceManager() 공개 메소드

Create a new ResourceManager instance.
public ResourceManager ( string ModuleResName ) : System
ModuleResName string Optionally supplies the resource name /// of the module. If null, it will be attempted to be gotten from the /// command line of the server, but this can fail if the server was /// not started with -module on the command line.
리턴 System