Ради вашего удобства наш сайт использует cookies! Узнать больше! Мы используем cookies

PatchOperationHighlander

A library of useful patch operations intended for collaboration. Due to the nature of RimWorld DLL loading, there can only be one Assembly for the [b]PatchOperation[/b] namespace. Feel free to contribute. PatchOperation.[b][url=https%3A%2F%2Fgithub.com%2Fnotfood%2FPatchOperationHighlander%2Fwiki%2FPatchOperation.LoadOnDemand]LoadOnDemand[/url][github.com][/b] Given a set of mods and a set of folders, LoadOnDemand loads the defs found in the folders located inside Defs_OnDemand if the mods exist. Makes it easier to manage optional dependencies as you can combine it with other PatchOperations. PatchOperation.[b][url=https%3A%2F%2Fgithub.com%2Fnotfood%2FPatchOperationHighlander%2Fwiki%2FPatchOperation.Context]Context[/url][github.com][/b] Given a xpath, using the following operations, limit their context to the xpath and run them in sequence. Huge performance gain as multiple operations are limited to small portions of the xml document. Can apply to any xpath with children. PatchOperation.[b][url=https%3A%2F%2Fgithub.com%2Fnotfood%2FPatchOperationHighlander%2Fwiki%2FPatchOperation.Set]Set[/url][github.com][/b] Given a xpath, add or replace child elements. Useful to change a single element that contains multiple children without setting Context. It'll avoid adding duplicates or complain if any is missing. PatchOperation.[b][url=https%3A%2F%2Fgithub.com%2Fnotfood%2FPatchOperationHighlander%2Fwiki%2FPatchOperation.Evaluate]Evaluate[/url][github.com][/b] Given a member field or property with the syntax Type:Member, compare the member's value with the given value. Optionally, log the current value. PatchOperation.[b][url=https%3A%2F%2Fgithub.com%2Fnotfood%2FPatchOperationHighlander%2Fwiki%2FPatchOperation.FindModByID]FindModByID[/url][github.com][/b] Just like its vanilla PatchOperationFindMod counterpart, executes the PatchOperation in match if found otherwise nomatch. Optionally, match all mods in the list. PatchOperation.[b][url=https%3A%2F%2Fgithub.com%2Fnotfood%2FPatchOperationHighlander%2Fwiki%2FPatchOperation.LogXML]LogXML[/url][github.com][/b] Writes the XML in its current state to the log, very useful to find out what happened. xpath is optional, combos well with Context. PatchOperation.[b][url=https%3A%2F%2Fgithub.com%2Fnotfood%2FPatchOperationHighlander%2Fwiki%2FPatchOperation.LogText]LogText[/url][github.com][/b] Writes text, very useful for debugging, don't understimate. Visit the [url=https%3A%2F%2Fgithub.com%2Fnotfood%2FPatchOperationHighlander%2Fwiki]wiki[/url][github.com] for documentation and examples. Source at [url=https%3A%2F%2Fgithub.com%2Fnotfood%2FPatchOperationHighlander]Github[/url][github.com]