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< ModEntity > ModListAll = []
 所有模组,含禁用的
static List< ModEntity > ModList = []
 所有已启用的模组
static Dictionary< string, ModEntity > PackageNameToModEntity = []
 含所有已启用的模组
static List< ModLoader > ModLoaders = []
static Dictionary< string, HashSet< string > > DisabledMods = []
static Dictionary< string, ModHook > ModHooks = []
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, ClassSubstitute > SelectedClassSubstitutes = []
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.cs 第 19 行定义.

成员枚举类型说明

◆ ApiVersionEnum

枚举值
Version15x 
Version170 
Version180 

在文件 ModsManager.cs 第 34 行定义.

成员函数说明

◆ AddException()

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

在文件 ModsManager.cs 第 469 行定义.

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

◆ CombineClo()

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

在文件 ModsManager.cs 第 563 行定义.

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

◆ CombineCr()

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

在文件 ModsManager.cs 第 594 行定义.

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

◆ CombineCrLogic()

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

在文件 ModsManager.cs 第 599 行定义.

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

◆ CombineDataBase() [1/2]

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

在文件 ModsManager.cs 第 730 行定义.

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

◆ CombineDataBase() [2/2]

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

在文件 ModsManager.cs 第 734 行定义.

函数调用图:

◆ DealWithClassSubstitutes()

void ModsManager.DealWithClassSubstitutes ( )
static

在文件 ModsManager.cs 第 786 行定义.

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

◆ DeserializeJson()

ModInfo ModsManager.DeserializeJson ( string json)
static

在文件 ModsManager.cs 第 212 行定义.

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

◆ DisableHook()

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

在文件 ModsManager.cs 第 200 行定义.

◆ FindElement()

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

在文件 ModsManager.cs 第 547 行定义.

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

◆ FindElementByGuid()

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

在文件 ModsManager.cs 第 552 行定义.

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

◆ GetAllowContinue()

bool ModsManager.GetAllowContinue ( )
static

在文件 ModsManager.cs 第 130 行定义.

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

◆ GetDecipherStream()

Stream ModsManager.GetDecipherStream ( Stream stream)
static

在文件 ModsManager.cs 第 927 行定义.

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

◆ GetInPakOrStorageFile< T >()

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

在文件 ModsManager.cs 第 208 行定义.

◆ GetMd5()

string ModsManager.GetMd5 ( string input)
static

在文件 ModsManager.cs 第 525 行定义.

◆ GetModEntity()

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

在文件 ModsManager.cs 第 125 行定义.

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

◆ GetScmods()

void ModsManager.GetScmods ( string path)
static

获取所有文件

参数
path文件路径

在文件 ModsManager.cs 第 479 行定义.

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

◆ GetSha256()

string ModsManager.GetSha256 ( string input)
static

在文件 ModsManager.cs 第 538 行定义.

◆ HasAttribute()

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

在文件 ModsManager.cs 第 557 行定义.

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

◆ HookAction()

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

执行Hook

参数
HookName
action

在文件 ModsManager.cs 第 146 行定义.

函数调用图:

◆ HookActionReverse()

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

在文件 ModsManager.cs 第 157 行定义.

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

◆ ImportMod()

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

在文件 ModsManager.cs 第 367 行定义.

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

◆ Initialize()

void ModsManager.Initialize ( )
static

在文件 ModsManager.cs 第 398 行定义.

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

◆ InitImportantDatabaseClasses()

void ModsManager.InitImportantDatabaseClasses ( )
staticpackage

在文件 ModsManager.cs 第 707 行定义.

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

◆ LoadConfigs()

void ModsManager.LoadConfigs ( )
static

在文件 ModsManager.cs 第 321 行定义.

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

◆ LoadConfigsFromXml()

void ModsManager.LoadConfigsFromXml ( XElement xElement)
static

在文件 ModsManager.cs 第 337 行定义.

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

◆ LoadModSettings()

void ModsManager.LoadModSettings ( XElement xElement)
static

在文件 ModsManager.cs 第 355 行定义.

函数调用图:

◆ Modify()

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

在文件 ModsManager.cs 第 652 行定义.

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

◆ ModListAllDo()

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

在文件 ModsManager.cs 第 392 行定义.

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

◆ Reboot()

void ModsManager.Reboot ( )
staticpackage

在文件 ModsManager.cs 第 132 行定义.

函数调用图:

◆ RegisterHook()

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

注册Hook

参数
HookName
modLoader

在文件 ModsManager.cs 第 192 行定义.

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

◆ SaveConfigs()

void ModsManager.SaveConfigs ( )
static

在文件 ModsManager.cs 第 311 行定义.

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

◆ SaveModSettings()

void ModsManager.SaveModSettings ( XElement xElement)
static

在文件 ModsManager.cs 第 305 行定义.

函数调用图:

◆ SetConfig()

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

在文件 ModsManager.cs 第 361 行定义.

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

◆ StreamToBytes()

byte[] ModsManager.StreamToBytes ( Stream stream)
static

将 Stream 转成 byte[]

在文件 ModsManager.cs 第 516 行定义.

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

◆ StreamToString()

string ModsManager.StreamToString ( Stream stream)
static

在文件 ModsManager.cs 第 508 行定义.

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

◆ StrengtheningMod()

bool ModsManager.StrengtheningMod ( string path)
static

在文件 ModsManager.cs 第 982 行定义.

函数调用图:

◆ TryInvoke()

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

在文件 ModsManager.cs 第 170 行定义.

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

◆ TryParseVersionRange()

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

在文件 ModsManager.cs 第 847 行定义.

类成员变量说明

◆ AllowContinue

bool ModsManager.AllowContinue = true
staticprivate

在文件 ModsManager.cs 第 103 行定义.

◆ APILatestReleaseLink_API

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

在文件 ModsManager.cs 第 27 行定义.

◆ APILatestReleaseLink_Client

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

在文件 ModsManager.cs 第 28 行定义.

◆ APINuGetVersion

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

在文件 ModsManager.cs 第 23 行定义.

◆ APIReleasesLink_API

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

在文件 ModsManager.cs 第 29 行定义.

◆ APIReleasesLink_Client

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

在文件 ModsManager.cs 第 30 行定义.

◆ ApiVersion

const ApiVersionEnum ModsManager.ApiVersion = ApiVersionEnum.Version180
static

在文件 ModsManager.cs 第 41 行定义.

◆ APIVersionString

string ModsManager.APIVersionString = "1.8.2.3"
static

在文件 ModsManager.cs 第 21 行定义.

◆ ClassSubstitutes

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

在文件 ModsManager.cs 第 701 行定义.

◆ ConfigLoaded

bool ModsManager.ConfigLoaded
staticpackage

在文件 ModsManager.cs 第 73 行定义.

◆ Configs

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

在文件 ModsManager.cs 第 104 行定义.

◆ DisabledMods

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

在文件 ModsManager.cs 第 120 行定义.

◆ Dlls

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

在文件 ModsManager.cs 第 123 行定义.

◆ DocPath

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

在文件 ModsManager.cs 第 45 行定义.

◆ fName

string ModsManager.fName = "ModsManager"
static

在文件 ModsManager.cs 第 31 行定义.

◆ GameVersion

string ModsManager.GameVersion = "2.4.0.0"
static

在文件 ModsManager.cs 第 24 行定义.

◆ HeadingCode

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

在文件 ModsManager.cs 第 924 行定义.

◆ HeadingCode2

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

在文件 ModsManager.cs 第 925 行定义.

◆ ImportantDatabaseClasses

FrozenDictionary<string, string> ModsManager.ImportantDatabaseClasses
static

在文件 ModsManager.cs 第 700 行定义.

◆ m_hookBugLogged

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

在文件 ModsManager.cs 第 168 行定义.

◆ ModHooks

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

在文件 ModsManager.cs 第 122 行定义.

◆ ModList

List<ModEntity> ModsManager.ModList = []
static

所有已启用的模组

在文件 ModsManager.cs 第 112 行定义.

◆ ModListAll

List<ModEntity> ModsManager.ModListAll = []
static

所有模组,含禁用的

在文件 ModsManager.cs 第 108 行定义.

◆ ModLoaders

List<ModLoader> ModsManager.ModLoaders = []
static

在文件 ModsManager.cs 第 117 行定义.

◆ ModsPath

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

在文件 ModsManager.cs 第 68 行定义.

◆ ModSuffix

string ModsManager.ModSuffix = ".scmod"
static

在文件 ModsManager.cs 第 20 行定义.

◆ OldClassSubstitutes

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

在文件 ModsManager.cs 第 702 行定义.

◆ PackageNameToModEntity

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

含所有已启用的模组

在文件 ModsManager.cs 第 116 行定义.

◆ ProcessModListPath

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

在文件 ModsManager.cs 第 53 行定义.

◆ ReportLink

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

在文件 ModsManager.cs 第 26 行定义.

◆ SelectedClassSubstitutes

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

在文件 ModsManager.cs 第 703 行定义.

◆ ShortAPIVersionString

string ModsManager.ShortAPIVersionString = "1.8"
static

在文件 ModsManager.cs 第 22 行定义.

◆ ShortGameVersion

string ModsManager.ShortGameVersion = "2.4"
static

在文件 ModsManager.cs 第 25 行定义.

◆ SurvivalCraftModEntity

ModEntity ModsManager.SurvivalCraftModEntity
staticpackage

在文件 ModsManager.cs 第 72 行定义.

◆ WorldsDirectoryName

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

在文件 ModsManager.cs 第 46 行定义.

属性说明

◆ BlockTexturesDirectoryName

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

在文件 ModsManager.cs 第 61 行定义.

◆ CharacterSkinsDirectoryName

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

在文件 ModsManager.cs 第 58 行定义.

◆ CommunityContentCachePath

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

在文件 ModsManager.cs 第 62 行定义.

◆ ConfigsPath

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

在文件 ModsManager.cs 第 66 行定义.

◆ ExternalPath

string ModsManager.ExternalPath
staticget

在文件 ModsManager.cs 第 44 行定义.

◆ FurniturePacksDirectoryName

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

在文件 ModsManager.cs 第 59 行定义.

◆ IsAndroid

bool ModsManager.IsAndroid
staticget

在文件 ModsManager.cs 第 69 行定义.

◆ LogPath

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

在文件 ModsManager.cs 第 67 行定义.

◆ ModsSettingsPath

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

在文件 ModsManager.cs 第 64 行定义.

◆ OriginalCommunityContentCachePath

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

在文件 ModsManager.cs 第 63 行定义.

◆ ScreenCapturePath

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

在文件 ModsManager.cs 第 55 行定义.

◆ SettingPath

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

在文件 ModsManager.cs 第 65 行定义.

◆ UserDataPath

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

在文件 ModsManager.cs 第 57 行定义.


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