My Project v1
Project
载入中...
搜索中...
未找到
ModsManager
ModsManager 的协作图:

class  ModSettings
 

Public 类型

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

Public 成员函数

class ModHook (string name)
 

静态 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 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 xElement, Stream cloorcr)
 
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 DataBaseXml, Stream Xdb)
 

静态 Public 属性

static string ModSuffix = ".scmod"
 
static string APIVersionString = "1.81"
 
static string GameVersion = "2.4.0.0"
 
static string ShortGameVersion = "2.4"
 
static string ReportLink = "https://gitee.com/SC-SPM/SurvivalcraftApi/issues"
 
static string APIReleaseLink_API = "https://gitee.com/api/v5/repos/SC-SPM/SurvivalcraftApi/releases/latest"
 
static string APIReleaseLink_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 List< ModLoaderModLoaders = []
 
static List< ModInfoDisabledMods = []
 
static Dictionary< string, ModHookModHooks = []
 
static Dictionary< string, Assembly > Dlls = []
 
static Dictionary< KeyValuePair< ModHook, ModLoader >, bool > m_hookBugLogged = []
 
static Dictionary< string, string > ModifiedElement = new Dictionary<string, string>()
 

静态包函数

static void Reboot ()
 
static void InitModifiedElement ()
 

静态包属性

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 ModDisPath = ExternalPath + "/DisabledMods" [get]
 
static string LogPath = ExternalPath + "/Bugs" [get]
 
static bool IsAndroid [get]
 

静态 Private 属性

static bool AllowContinue = true
 
static int collisionsToHandle = 0
 

成员枚举类型说明

◆ ApiVersionEnum

枚举值
Version15x 
Version170 
Version180 

成员函数说明

◆ AddException()

static void ModsManager.AddException ( Exception e,
bool AllowContinue_ = false )
static
函数调用图:
这是这个函数的调用关系图:

◆ CombineClo()

static void ModsManager.CombineClo ( XElement xElement,
Stream cloorcr )
static
函数调用图:
这是这个函数的调用关系图:

◆ CombineCr()

static void ModsManager.CombineCr ( XElement xElement,
Stream cloorcr )
static
函数调用图:
这是这个函数的调用关系图:

◆ CombineCrLogic()

static void ModsManager.CombineCrLogic ( XElement xElement,
XElement needCombine )
static
函数调用图:
这是这个函数的调用关系图:

◆ CombineDataBase()

static void ModsManager.CombineDataBase ( XElement DataBaseXml,
Stream Xdb )
static
函数调用图:
这是这个函数的调用关系图:

◆ DeserializeJson()

static ModInfo ModsManager.DeserializeJson ( string json)
static
这是这个函数的调用关系图:

◆ DisableHook()

static void ModsManager.DisableHook ( ModLoader from,
string HookName,
string packageName,
string reason )
static
函数调用图:

◆ FindElement()

static bool ModsManager.FindElement ( XElement xElement,
Func< XElement, bool > func,
out XElement elementout )
static
函数调用图:
这是这个函数的调用关系图:

◆ FindElementByGuid()

static bool ModsManager.FindElementByGuid ( XElement xElement,
string guid,
out XElement elementout )
static
函数调用图:
这是这个函数的调用关系图:

◆ GetAllowContinue()

static bool ModsManager.GetAllowContinue ( )
static
这是这个函数的调用关系图:

◆ GetInPakOrStorageFile< T >()

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

◆ GetMd5()

static string ModsManager.GetMd5 ( string input)
static

◆ GetModEntity()

static bool ModsManager.GetModEntity ( string packagename,
out ModEntity modEntity )
static
这是这个函数的调用关系图:

◆ GetScmods()

static void ModsManager.GetScmods ( string path)
static

获取所有文件

参数
path文件路径
函数调用图:
这是这个函数的调用关系图:

◆ HasAttribute()

static bool ModsManager.HasAttribute ( XElement element,
Func< string, bool > func,
out XAttribute xAttributeout )
static
这是这个函数的调用关系图:

◆ HookAction()

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

执行Hook

参数
HookName
action
函数调用图:

◆ HookActionReverse()

static void ModsManager.HookActionReverse ( string HookName,
Func< ModLoader, bool > action )
static
函数调用图:
这是这个函数的调用关系图:

◆ ImportMod()

static string ModsManager.ImportMod ( string name,
Stream stream )
static
函数调用图:
这是这个函数的调用关系图:

◆ Initialize()

static void ModsManager.Initialize ( )
static
函数调用图:
这是这个函数的调用关系图:

◆ InitModifiedElement()

static void ModsManager.InitModifiedElement ( )
staticpackage
这是这个函数的调用关系图:

◆ LoadConfigs()

static void ModsManager.LoadConfigs ( )
static
函数调用图:
这是这个函数的调用关系图:

◆ LoadConfigsFromXml()

static void ModsManager.LoadConfigsFromXml ( XElement xElement)
static
函数调用图:
这是这个函数的调用关系图:

◆ LoadModSettings()

static void ModsManager.LoadModSettings ( XElement xElement)
static
函数调用图:

◆ ModHook()

class ModsManager.ModHook ( string name)
这是这个函数的调用关系图:

◆ Modify()

static void ModsManager.Modify ( XElement source,
XElement change )
static
函数调用图:
这是这个函数的调用关系图:

◆ ModListAllDo()

static void ModsManager.ModListAllDo ( Action< ModEntity > entity)
static
这是这个函数的调用关系图:

◆ Reboot()

static void ModsManager.Reboot ( )
staticpackage
函数调用图:
这是这个函数的调用关系图:

◆ RegisterHook()

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

注册Hook

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

◆ SaveConfigs()

static void ModsManager.SaveConfigs ( )
static
这是这个函数的调用关系图:

◆ SaveModSettings()

static void ModsManager.SaveModSettings ( XElement xElement)
static
函数调用图:

◆ SetConfig()

static void ModsManager.SetConfig ( string key,
string value )
static
这是这个函数的调用关系图:

◆ StreamToBytes()

static byte[] ModsManager.StreamToBytes ( Stream stream)
static

将 Stream 转成 byte[]

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

◆ StreamToString()

static string ModsManager.StreamToString ( Stream stream)
static
这是这个函数的调用关系图:

◆ TryInvoke()

static bool ModsManager.TryInvoke ( ModHook modHook,
ModLoader modLoader,
Func< ModLoader, bool > action )
static
这是这个函数的调用关系图:

类成员变量说明

◆ AllowContinue

bool ModsManager.AllowContinue = true
staticprivate

◆ APIReleaseLink_API

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

◆ APIReleaseLink_Client

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

◆ ApiVersion

const ApiVersionEnum ModsManager.ApiVersion = ApiVersionEnum.Version180
static

◆ APIVersionString

string ModsManager.APIVersionString = "1.81"
static

◆ collisionsToHandle

int ModsManager.collisionsToHandle = 0
staticprivate

◆ ConfigLoaded

bool ModsManager.ConfigLoaded
staticpackage

◆ Configs

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

◆ DisabledMods

List<ModInfo> ModsManager.DisabledMods = []
static

◆ Dlls

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

◆ DocPath

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

◆ fName

string ModsManager.fName = "ModsManager"
static

◆ GameVersion

string ModsManager.GameVersion = "2.4.0.0"
static

◆ m_hookBugLogged

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

◆ ModHooks

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

◆ ModifiedElement

Dictionary<string, string> ModsManager.ModifiedElement = new Dictionary<string, string>()
static

◆ ModList

List<ModEntity> ModsManager.ModList = []
static

◆ ModListAll

List<ModEntity> ModsManager.ModListAll = []
static

◆ ModLoaders

List<ModLoader> ModsManager.ModLoaders = []
static

◆ ModsPath

string ModsManager.ModsPath = ExternalPath + "/Mods"
static

◆ ModSuffix

string ModsManager.ModSuffix = ".scmod"
static

◆ ProcessModListPath

string ModsManager.ProcessModListPath = ExternalPath + "/ProcessModLists"
static

◆ ReportLink

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

◆ ShortGameVersion

string ModsManager.ShortGameVersion = "2.4"
static

◆ SurvivalCraftModEntity

ModEntity ModsManager.SurvivalCraftModEntity
staticpackage

◆ WorldsDirectoryName

string ModsManager.WorldsDirectoryName = DocPath+"/Worlds"
static

属性说明

◆ BlockTexturesDirectoryName

string ModsManager.BlockTexturesDirectoryName = DocPath + "/TexturePacks"
staticget

◆ CharacterSkinsDirectoryName

string ModsManager.CharacterSkinsDirectoryName = DocPath + "/CharacterSkins"
staticget

◆ CommunityContentCachePath

string ModsManager.CommunityContentCachePath = DocPath + "/CommunityContentCache.xml"
staticget

◆ ConfigsPath

string ModsManager.ConfigsPath = DocPath + "/Configs.xml"
staticget

◆ ExternalPath

string ModsManager.ExternalPath
staticget

◆ FurniturePacksDirectoryName

string ModsManager.FurniturePacksDirectoryName = DocPath + "/FurniturePacks"
staticget

◆ IsAndroid

bool ModsManager.IsAndroid
staticget

◆ LogPath

string ModsManager.LogPath = ExternalPath + "/Bugs"
staticget

◆ ModDisPath

string ModsManager.ModDisPath = ExternalPath + "/DisabledMods"
staticget

◆ ModsSettingsPath

string ModsManager.ModsSettingsPath = DocPath + "/ModSettings.xml"
staticget

◆ OriginalCommunityContentCachePath

string ModsManager.OriginalCommunityContentCachePath = DocPath + "/OriginalCommunityContentCache.xml"
staticget

◆ ScreenCapturePath

string ModsManager.ScreenCapturePath = ExternalPath + "/ScreenCapture"
staticget

◆ SettingPath

string ModsManager.SettingPath = DocPath + "/Settings.xml"
staticget

◆ UserDataPath

string ModsManager.UserDataPath = DocPath + "/UserId.dat"
staticget

该类的文档由以下文件生成: