Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
ModsManager
ModsManager 的协作图:

class  ModSettings
class  ModHook
class  ClassSubstitute

Public 类型

enum  ApiVersionEnum { Version15x = 3 , Version170 = 17 , Version180 = 18 }

静态 Public 成员函数

static bool GetModEntity (string packagename, out ModEntity modEntity)
static bool GetAllowContinue ()
static void HookAction (string HookName, Func< ModLoader, bool > action)
 执行Hook
static void HookActionReverse (string HookName, Func< ModLoader, bool > action)
static bool TryInvoke (ModHook modHook, ModLoader modLoader, Func< ModLoader, bool > action)
static void RegisterHook (string HookName, ModLoader modLoader)
 注册Hook
static void DisableHook (ModLoader from, string HookName, string packageName, string reason)
static T GetInPakOrStorageFile< T > (string filePath, string suffix="txt")
static ModInfo DeserializeJson (string json)
static void SaveModSettings (XElement xElement)
static void SaveConfigs ()
static void LoadConfigs ()
static void LoadConfigsFromXml (XElement xElement)
static void LoadModSettings (XElement xElement)
static void SetConfig (string key, string value)
static string ImportMod (string name, Stream stream)
static void ModListAllDo (Action< ModEntity > entity)
static void Initialize ()
static void AddException (Exception e, bool AllowContinue_=false)
static void GetScmods (string path)
 获取所有文件
static string StreamToString (Stream stream)
static byte[] StreamToBytes (Stream stream)
 将 Stream 转成 byte[]
static string GetMd5 (string input)
static string GetSha256 (string input)
static bool FindElement (XElement xElement, Func< XElement, bool > func, out XElement elementout)
static bool FindElementByGuid (XElement xElement, string guid, out XElement elementout)
static bool HasAttribute (XElement element, Func< string, bool > func, out XAttribute xAttributeout)
static void CombineClo (XElement clothesRoot, Stream toCombineStream)
static void CombineCr (XElement xElement, Stream cloorcr)
static void CombineCrLogic (XElement xElement, XElement needCombine)
static void Modify (XElement source, XElement change)
static void CombineDataBase (XElement databaseRoot, Stream toCombineStream)
static void CombineDataBase (XElement databaseRoot, Stream toCombineStream, string modPackageName)
static void DealWithClassSubstitutes ()
static bool TryParseVersionRange (string value, out VersionRange versionRange)
static Stream GetDecipherStream (Stream stream)
static bool StrengtheningMod (string path)

静态 Public 属性

static string ModSuffix = ".scmod"
static string APIVersionString = "1.8.2.3"
static string ShortAPIVersionString = "1.8"
static NuGetVersion APINuGetVersion = new(1, 8, 2, 3)
static string GameVersion = "2.4.0.0"
static string ShortGameVersion = "2.4"
static string ReportLink = "https://gitee.com/SC-SPM/SurvivalcraftApi/issues"
static string APILatestReleaseLink_API = "https://gitee.com/api/v5/repos/SC-SPM/SurvivalcraftApi/releases/latest"
static string APILatestReleaseLink_Client = "https://gitee.com/SC-SPM/SurvivalcraftApi/releases/latest"
static string APIReleasesLink_API = "https://gitee.com/api/v5/repos/SC-SPM/SurvivalcraftApi/releases"
static string APIReleasesLink_Client = "https://gitee.com/SC-SPM/SurvivalcraftApi/releases/"
static string fName = "ModsManager"
const ApiVersionEnum ApiVersion = ApiVersionEnum.Version180
static string DocPath = "app:/doc"
static string WorldsDirectoryName = $"{DocPath}/Worlds"
static string ProcessModListPath = $"{ExternalPath}/ProcessModLists"
static string ModsPath = $"{ExternalPath}/Mods"
static Dictionary< string, string > Configs = []
static List< ModEntityModListAll = []
 所有模组,含禁用的
static List< ModEntityModList = []
 所有已启用的模组
static Dictionary< string, ModEntityPackageNameToModEntity = []
 含所有已启用的模组
static List< ModLoaderModLoaders = []
static Dictionary< string, HashSet< string > > DisabledMods = []
static Dictionary< string, ModHookModHooks = []
static Dictionary< string, Assembly > Dlls = []
static Dictionary< KeyValuePair< ModHook, ModLoader >, bool > m_hookBugLogged = []
static FrozenDictionary< string, string > ImportantDatabaseClasses
static Dictionary< string, List< ClassSubstitute > > ClassSubstitutes = []
static Dictionary< string, List< ClassSubstitute > > OldClassSubstitutes = []
static Dictionary< string, ClassSubstituteSelectedClassSubstitutes = []
static string HeadingCode = "有头有脸天才少年,耍猴表演敢为人先"
static string HeadingCode2 = "修改他人mod请获得原作者授权,否则小心出名!"

静态包函数

static void Reboot ()
static void InitImportantDatabaseClasses ()

静态包属性

static ModEntity SurvivalCraftModEntity
static bool ConfigLoaded

属性

static string ExternalPath [get]
static string ScreenCapturePath = $"{ExternalPath}/ScreenCapture" [get]
static string UserDataPath = $"{DocPath}/UserId.dat" [get]
static string CharacterSkinsDirectoryName = $"{DocPath}/CharacterSkins" [get]
static string FurniturePacksDirectoryName = $"{DocPath}/FurniturePacks" [get]
static string BlockTexturesDirectoryName = $"{DocPath}/TexturePacks" [get]
static string CommunityContentCachePath = $"{DocPath}/CommunityContentCache.xml" [get]
static string OriginalCommunityContentCachePath = $"{DocPath}/OriginalCommunityContentCache.xml" [get]
static string ModsSettingsPath = $"{DocPath}/ModSettings.xml" [get]
static string SettingPath = $"{DocPath}/Settings.xml" [get]
static string ConfigsPath = $"{DocPath}/Configs.xml" [get]
static string LogPath = $"{ExternalPath}/Bugs" [get]
static bool IsAndroid [get]

静态 Private 属性

static bool AllowContinue = true

详细描述

在文件 ModsManager.cs19 行定义.

成员枚举类型说明

◆ ApiVersionEnum

枚举值
Version15x 
Version170 
Version180 

在文件 ModsManager.cs34 行定义.

成员函数说明

◆ AddException()

void ModsManager.AddException ( Exception e,
bool AllowContinue_ = false )
static

在文件 ModsManager.cs469 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ CombineClo()

void ModsManager.CombineClo ( XElement clothesRoot,
Stream toCombineStream )
static

在文件 ModsManager.cs563 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ CombineCr()

void ModsManager.CombineCr ( XElement xElement,
Stream cloorcr )
static

在文件 ModsManager.cs594 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ CombineCrLogic()

void ModsManager.CombineCrLogic ( XElement xElement,
XElement needCombine )
static

在文件 ModsManager.cs599 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ CombineDataBase() [1/2]

void ModsManager.CombineDataBase ( XElement databaseRoot,
Stream toCombineStream )
static

在文件 ModsManager.cs730 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ CombineDataBase() [2/2]

void ModsManager.CombineDataBase ( XElement databaseRoot,
Stream toCombineStream,
string modPackageName )
static

在文件 ModsManager.cs734 行定义.

函数调用图:

◆ DealWithClassSubstitutes()

void ModsManager.DealWithClassSubstitutes ( )
static

在文件 ModsManager.cs786 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ DeserializeJson()

ModInfo ModsManager.DeserializeJson ( string json)
static

在文件 ModsManager.cs212 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ DisableHook()

void ModsManager.DisableHook ( ModLoader from,
string HookName,
string packageName,
string reason )
static

在文件 ModsManager.cs200 行定义.

◆ FindElement()

bool ModsManager.FindElement ( XElement xElement,
Func< XElement, bool > func,
out XElement elementout )
static

在文件 ModsManager.cs547 行定义.

这是这个函数的调用关系图:

◆ FindElementByGuid()

bool ModsManager.FindElementByGuid ( XElement xElement,
string guid,
out XElement elementout )
static

在文件 ModsManager.cs552 行定义.

这是这个函数的调用关系图:

◆ GetAllowContinue()

bool ModsManager.GetAllowContinue ( )
static

在文件 ModsManager.cs130 行定义.

这是这个函数的调用关系图:

◆ GetDecipherStream()

Stream ModsManager.GetDecipherStream ( Stream stream)
static

在文件 ModsManager.cs927 行定义.

这是这个函数的调用关系图:

◆ GetInPakOrStorageFile< T >()

T ModsManager.GetInPakOrStorageFile< T > ( string filePath,
string suffix = "txt" )
static
类型限制
T :class 

在文件 ModsManager.cs208 行定义.

◆ GetMd5()

string ModsManager.GetMd5 ( string input)
static

在文件 ModsManager.cs525 行定义.

◆ GetModEntity()

bool ModsManager.GetModEntity ( string packagename,
out ModEntity modEntity )
static

在文件 ModsManager.cs125 行定义.

这是这个函数的调用关系图:

◆ GetScmods()

void ModsManager.GetScmods ( string path)
static

获取所有文件

参数
path文件路径

在文件 ModsManager.cs479 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ GetSha256()

string ModsManager.GetSha256 ( string input)
static

在文件 ModsManager.cs538 行定义.

◆ HasAttribute()

bool ModsManager.HasAttribute ( XElement element,
Func< string, bool > func,
out XAttribute xAttributeout )
static

在文件 ModsManager.cs557 行定义.

这是这个函数的调用关系图:

◆ HookAction()

void ModsManager.HookAction ( string HookName,
Func< ModLoader, bool > action )
static

执行Hook

参数
HookName
action

在文件 ModsManager.cs146 行定义.

函数调用图:

◆ HookActionReverse()

void ModsManager.HookActionReverse ( string HookName,
Func< ModLoader, bool > action )
static

在文件 ModsManager.cs157 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ ImportMod()

string ModsManager.ImportMod ( string name,
Stream stream )
static

在文件 ModsManager.cs367 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ Initialize()

void ModsManager.Initialize ( )
static

在文件 ModsManager.cs398 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ InitImportantDatabaseClasses()

void ModsManager.InitImportantDatabaseClasses ( )
staticpackage

在文件 ModsManager.cs707 行定义.

这是这个函数的调用关系图:

◆ LoadConfigs()

void ModsManager.LoadConfigs ( )
static

在文件 ModsManager.cs321 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ LoadConfigsFromXml()

void ModsManager.LoadConfigsFromXml ( XElement xElement)
static

在文件 ModsManager.cs337 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ LoadModSettings()

void ModsManager.LoadModSettings ( XElement xElement)
static

在文件 ModsManager.cs355 行定义.

函数调用图:

◆ Modify()

void ModsManager.Modify ( XElement source,
XElement change )
static

在文件 ModsManager.cs652 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ ModListAllDo()

void ModsManager.ModListAllDo ( Action< ModEntity > entity)
static

在文件 ModsManager.cs392 行定义.

这是这个函数的调用关系图:

◆ Reboot()

void ModsManager.Reboot ( )
staticpackage

在文件 ModsManager.cs132 行定义.

函数调用图:

◆ RegisterHook()

void ModsManager.RegisterHook ( string HookName,
ModLoader modLoader )
static

注册Hook

参数
HookName
modLoader

在文件 ModsManager.cs192 行定义.

这是这个函数的调用关系图:

◆ SaveConfigs()

void ModsManager.SaveConfigs ( )
static

在文件 ModsManager.cs311 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ SaveModSettings()

void ModsManager.SaveModSettings ( XElement xElement)
static

在文件 ModsManager.cs305 行定义.

函数调用图:

◆ SetConfig()

void ModsManager.SetConfig ( string key,
string value )
static

在文件 ModsManager.cs361 行定义.

这是这个函数的调用关系图:

◆ StreamToBytes()

byte[] ModsManager.StreamToBytes ( Stream stream)
static

将 Stream 转成 byte[]

在文件 ModsManager.cs516 行定义.

这是这个函数的调用关系图:

◆ StreamToString()

string ModsManager.StreamToString ( Stream stream)
static

在文件 ModsManager.cs508 行定义.

这是这个函数的调用关系图:

◆ StrengtheningMod()

bool ModsManager.StrengtheningMod ( string path)
static

在文件 ModsManager.cs982 行定义.

函数调用图:

◆ TryInvoke()

bool ModsManager.TryInvoke ( ModHook modHook,
ModLoader modLoader,
Func< ModLoader, bool > action )
static

在文件 ModsManager.cs170 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ TryParseVersionRange()

bool ModsManager.TryParseVersionRange ( string value,
out VersionRange versionRange )
static

在文件 ModsManager.cs847 行定义.

类成员变量说明

◆ AllowContinue

bool ModsManager.AllowContinue = true
staticprivate

在文件 ModsManager.cs103 行定义.

◆ APILatestReleaseLink_API

string ModsManager.APILatestReleaseLink_API = "https://gitee.com/api/v5/repos/SC-SPM/SurvivalcraftApi/releases/latest"
static

在文件 ModsManager.cs27 行定义.

◆ APILatestReleaseLink_Client

string ModsManager.APILatestReleaseLink_Client = "https://gitee.com/SC-SPM/SurvivalcraftApi/releases/latest"
static

在文件 ModsManager.cs28 行定义.

◆ APINuGetVersion

NuGetVersion ModsManager.APINuGetVersion = new(1, 8, 2, 3)
static

在文件 ModsManager.cs23 行定义.

◆ APIReleasesLink_API

string ModsManager.APIReleasesLink_API = "https://gitee.com/api/v5/repos/SC-SPM/SurvivalcraftApi/releases"
static

在文件 ModsManager.cs29 行定义.

◆ APIReleasesLink_Client

string ModsManager.APIReleasesLink_Client = "https://gitee.com/SC-SPM/SurvivalcraftApi/releases/"
static

在文件 ModsManager.cs30 行定义.

◆ ApiVersion

const ApiVersionEnum ModsManager.ApiVersion = ApiVersionEnum.Version180
static

在文件 ModsManager.cs41 行定义.

◆ APIVersionString

string ModsManager.APIVersionString = "1.8.2.3"
static

在文件 ModsManager.cs21 行定义.

◆ ClassSubstitutes

Dictionary<string, List<ClassSubstitute> > ModsManager.ClassSubstitutes = []
static

在文件 ModsManager.cs701 行定义.

◆ ConfigLoaded

bool ModsManager.ConfigLoaded
staticpackage

在文件 ModsManager.cs73 行定义.

◆ Configs

Dictionary<string, string> ModsManager.Configs = []
static

在文件 ModsManager.cs104 行定义.

◆ DisabledMods

Dictionary<string, HashSet<string> > ModsManager.DisabledMods = []
static

在文件 ModsManager.cs120 行定义.

◆ Dlls

Dictionary<string, Assembly> ModsManager.Dlls = []
static

在文件 ModsManager.cs123 行定义.

◆ DocPath

string ModsManager.DocPath = "app:/doc"
static

在文件 ModsManager.cs45 行定义.

◆ fName

string ModsManager.fName = "ModsManager"
static

在文件 ModsManager.cs31 行定义.

◆ GameVersion

string ModsManager.GameVersion = "2.4.0.0"
static

在文件 ModsManager.cs24 行定义.

◆ HeadingCode

string ModsManager.HeadingCode = "有头有脸天才少年,耍猴表演敢为人先"
static

在文件 ModsManager.cs924 行定义.

◆ HeadingCode2

string ModsManager.HeadingCode2 = "修改他人mod请获得原作者授权,否则小心出名!"
static

在文件 ModsManager.cs925 行定义.

◆ ImportantDatabaseClasses

FrozenDictionary<string, string> ModsManager.ImportantDatabaseClasses
static

在文件 ModsManager.cs700 行定义.

◆ m_hookBugLogged

Dictionary<KeyValuePair<ModHook, ModLoader>, bool> ModsManager.m_hookBugLogged = []
static

在文件 ModsManager.cs168 行定义.

◆ ModHooks

Dictionary<string, ModHook> ModsManager.ModHooks = []
static

在文件 ModsManager.cs122 行定义.

◆ ModList

List<ModEntity> ModsManager.ModList = []
static

所有已启用的模组

在文件 ModsManager.cs112 行定义.

◆ ModListAll

List<ModEntity> ModsManager.ModListAll = []
static

所有模组,含禁用的

在文件 ModsManager.cs108 行定义.

◆ ModLoaders

List<ModLoader> ModsManager.ModLoaders = []
static

在文件 ModsManager.cs117 行定义.

◆ ModsPath

string ModsManager.ModsPath = $"{ExternalPath}/Mods"
static

在文件 ModsManager.cs68 行定义.

◆ ModSuffix

string ModsManager.ModSuffix = ".scmod"
static

在文件 ModsManager.cs20 行定义.

◆ OldClassSubstitutes

Dictionary<string, List<ClassSubstitute> > ModsManager.OldClassSubstitutes = []
static

在文件 ModsManager.cs702 行定义.

◆ PackageNameToModEntity

Dictionary<string, ModEntity> ModsManager.PackageNameToModEntity = []
static

含所有已启用的模组

在文件 ModsManager.cs116 行定义.

◆ ProcessModListPath

string ModsManager.ProcessModListPath = $"{ExternalPath}/ProcessModLists"
static

在文件 ModsManager.cs53 行定义.

◆ ReportLink

string ModsManager.ReportLink = "https://gitee.com/SC-SPM/SurvivalcraftApi/issues"
static

在文件 ModsManager.cs26 行定义.

◆ SelectedClassSubstitutes

Dictionary<string, ClassSubstitute> ModsManager.SelectedClassSubstitutes = []
static

在文件 ModsManager.cs703 行定义.

◆ ShortAPIVersionString

string ModsManager.ShortAPIVersionString = "1.8"
static

在文件 ModsManager.cs22 行定义.

◆ ShortGameVersion

string ModsManager.ShortGameVersion = "2.4"
static

在文件 ModsManager.cs25 行定义.

◆ SurvivalCraftModEntity

ModEntity ModsManager.SurvivalCraftModEntity
staticpackage

在文件 ModsManager.cs72 行定义.

◆ WorldsDirectoryName

string ModsManager.WorldsDirectoryName = $"{DocPath}/Worlds"
static

在文件 ModsManager.cs46 行定义.

属性说明

◆ BlockTexturesDirectoryName

string ModsManager.BlockTexturesDirectoryName = $"{DocPath}/TexturePacks"
staticget

在文件 ModsManager.cs61 行定义.

◆ CharacterSkinsDirectoryName

string ModsManager.CharacterSkinsDirectoryName = $"{DocPath}/CharacterSkins"
staticget

在文件 ModsManager.cs58 行定义.

◆ CommunityContentCachePath

string ModsManager.CommunityContentCachePath = $"{DocPath}/CommunityContentCache.xml"
staticget

在文件 ModsManager.cs62 行定义.

◆ ConfigsPath

string ModsManager.ConfigsPath = $"{DocPath}/Configs.xml"
staticget

在文件 ModsManager.cs66 行定义.

◆ ExternalPath

string ModsManager.ExternalPath
staticget

在文件 ModsManager.cs44 行定义.

◆ FurniturePacksDirectoryName

string ModsManager.FurniturePacksDirectoryName = $"{DocPath}/FurniturePacks"
staticget

在文件 ModsManager.cs59 行定义.

◆ IsAndroid

bool ModsManager.IsAndroid
staticget

在文件 ModsManager.cs69 行定义.

◆ LogPath

string ModsManager.LogPath = $"{ExternalPath}/Bugs"
staticget

在文件 ModsManager.cs67 行定义.

◆ ModsSettingsPath

string ModsManager.ModsSettingsPath = $"{DocPath}/ModSettings.xml"
staticget

在文件 ModsManager.cs64 行定义.

◆ OriginalCommunityContentCachePath

string ModsManager.OriginalCommunityContentCachePath = $"{DocPath}/OriginalCommunityContentCache.xml"
staticget

在文件 ModsManager.cs63 行定义.

◆ ScreenCapturePath

string ModsManager.ScreenCapturePath = $"{ExternalPath}/ScreenCapture"
staticget

在文件 ModsManager.cs55 行定义.

◆ SettingPath

string ModsManager.SettingPath = $"{DocPath}/Settings.xml"
staticget

在文件 ModsManager.cs65 行定义.

◆ UserDataPath

string ModsManager.UserDataPath = $"{DocPath}/UserId.dat"
staticget

在文件 ModsManager.cs57 行定义.


该类的文档由以下文件生成:
  • E:/sc/doxygen/SurvivalcraftApi 1.8.2.3/Survivalcraft.Windows/ModsManager/ModsManager.cs