diff --git a/1.4/Assemblies/0Harmony.dll b/1.4/Assemblies/0Harmony.dll new file mode 100644 index 0000000..86fc5eb Binary files /dev/null and b/1.4/Assemblies/0Harmony.dll differ diff --git a/1.4/Assemblies/DualWield.dll b/1.4/Assemblies/DualWield.dll new file mode 100644 index 0000000..744d8c6 Binary files /dev/null and b/1.4/Assemblies/DualWield.dll differ diff --git a/1.4/Source/DualWield/Alerts/Altert_SkillLow.cs b/1.4/Source/DualWield/Alerts/Altert_SkillLow.cs new file mode 100644 index 0000000..60c4c51 --- /dev/null +++ b/1.4/Source/DualWield/Alerts/Altert_SkillLow.cs @@ -0,0 +1,87 @@ +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Alerts +{ + /** + * Disabled this: too annoying for players who know what they are doing. I might enable it again if too many non-readers get confused. + **/ + + /* + class Altert_SkillLow : Alert + { + public Altert_SkillLow() + { + this.defaultLabel = "DW_Alert_SkillTooLow_Label".Translate(); + } + private IEnumerable SkillTooLowPawns + { + get + { + return from p in PawnsFinder.AllMaps_FreeColonists + where SkillTooLow(p) + select p; + } + } + public override AlertReport GetReport() + { + return AlertReport.CulpritIs(this.SkillTooLowPawns.FirstOrDefault()); + } + public override string GetExplanation() + { + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.AppendLine(); + stringBuilder.AppendLine(); + foreach (Pawn current in this.SkillTooLowPawns) + { + stringBuilder.AppendLine(" " + current.Name); + } + stringBuilder.AppendLine(); + return string.Format("WTH_Alert_Maintenance_Low_Description".Translate(), stringBuilder.ToString()); + } + + private bool SkillTooLow(Pawn pawn) + { + if (pawn.equipment != null && pawn.equipment.TryGetOffHandEquipment(out ThingWithComps offHand) && pawn.skills != null) + { + if (pawn.equipment.Primary is ThingWithComps primary) + { + if (SkillToLowForWeapon(pawn, primary)) + { + return true; + } + } + if (SkillToLowForWeapon(pawn, offHand)) + { + return true; + } + } + return false; + } + + private static bool SkillToLowForWeapon(Pawn pawn, ThingWithComps primary) + { + + int level = 0; + if (primary.def.IsMeleeWeapon) + { + level = pawn.skills.GetSkill(SkillDefOf.Melee).Level; + } + else + { + level = pawn.skills.GetSkill(SkillDefOf.Shooting).Level; + } + int levelsShort = 20 - level; + if (levelsShort * Base.dynamicCooldownP > 75f) + { + return true; + } + return false; + } + } + */ +} diff --git a/1.4/Source/DualWield/Base.cs b/1.4/Source/DualWield/Base.cs new file mode 100644 index 0000000..5860e7a --- /dev/null +++ b/1.4/Source/DualWield/Base.cs @@ -0,0 +1,322 @@ +using DualWield.Settings; +using DualWield.Storage; +using HugsLib; +using HugsLib.Settings; +using HugsLib.Utils; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield +{ + public class Base : ModBase + { + public static Base Instance { get; private set; } + ExtendedDataStorage _extendedDataStorage; + public override string ModIdentifier => "Roolo.DualWield"; + + internal static SettingHandle settingsGroup_Drawing; + internal static SettingHandle settingsGroup_DualWield; + internal static SettingHandle settingsGroup_TwoHand; + internal static SettingHandle settingsGroup_Penalties; + + + internal static SettingHandle dualWieldSelection; + internal static SettingHandle twoHandSelection; + internal static SettingHandle customRotations; + + internal static SettingHandle staticCooldownPOffHand; + internal static SettingHandle staticCooldownPMainHand; + internal static SettingHandle staticAccPOffHand; + internal static SettingHandle staticAccPMainHand; + internal static SettingHandle dynamicCooldownP; + internal static SettingHandle dynamicAccP; + + internal static SettingHandle meleeAngle; + internal static SettingHandle rangedAngle; + internal static SettingHandle meleeXOffset; + internal static SettingHandle rangedXOffset; + internal static SettingHandle meleeZOffset; + internal static SettingHandle rangedZOffset; + + internal static SettingHandle meleeMirrored; + internal static SettingHandle rangedMirrored; + + + internal static SettingHandle note; + + internal static SettingHandle NPCDualWieldChance; + + + public Base() + { + Instance = this; + } + public override void DefsLoaded() + { + base.DefsLoaded(); + List allWeapons = GetAllWeapons(); + + settingsGroup_Drawing = Settings.GetHandle("settingsGroup_Drawing", "DW_SettingsGroup_Drawing_Title".Translate(), "DW_SettingsGroup_Drawing_Description".Translate(), false); + settingsGroup_Drawing.CustomDrawer = rect => { return GUIDrawUtility.CustomDrawer_Button(rect, settingsGroup_Drawing, "DW_Expand".Translate() + "..", "DW_Collapse".Translate()); }; + + note = Settings.GetHandle("note", null, null, "DW_Setting_Note_Drawing".Translate()); + note.CustomDrawer = rect => { return GUIDrawUtility.CustomDrawer_Note(rect, note); }; + note.VisibilityPredicate = delegate { return settingsGroup_Drawing; }; + + meleeAngle = Settings.GetHandle("meleeAngle", "DW_Setting_MeleeAngle_Title".Translate(), "DW_Setting_MeleeAngle_Description".Translate(), 270f, Validators.FloatRangeValidator(0, 360f)); + meleeAngle.VisibilityPredicate = delegate { return settingsGroup_Drawing; }; + + rangedAngle = Settings.GetHandle("rangedAngle", "DW_Setting_RangedAngle_Title".Translate(), "DW_Setting_RangedAngle_Description".Translate(), 135f, Validators.FloatRangeValidator(0, 360f)); + rangedAngle.VisibilityPredicate = delegate { return settingsGroup_Drawing; }; + + meleeXOffset = Settings.GetHandle("meleeXOffset", "DW_Setting_MeleeXOffset_Title".Translate(), "DW_Setting_MeleeXOffset_Description".Translate(), 0.4f, Validators.FloatRangeValidator(-2f, 2f)); + meleeXOffset.VisibilityPredicate = delegate { return settingsGroup_Drawing; }; + + rangedXOffset = Settings.GetHandle("rangedXOffset", "DW_Setting_RangedXOffset_Title".Translate(), "DW_Setting_RangedXOffset_Description".Translate(), 0.1f, Validators.FloatRangeValidator(-2f, 2f)); + rangedXOffset.VisibilityPredicate = delegate { return settingsGroup_Drawing; }; + + meleeZOffset = Settings.GetHandle("meleeYOffset", "DW_Setting_MeleeZOffset_Title".Translate(), "DW_Setting_MeleeZOffset_Description".Translate(), 0f, Validators.FloatRangeValidator(-2f, 2f)); + meleeZOffset.VisibilityPredicate = delegate { return settingsGroup_Drawing; }; + + rangedZOffset = Settings.GetHandle("rangedYOffset", "DW_Setting_RangedZOffset_Title".Translate(), "DW_Setting_RangedZOffset_Description".Translate(), 0f, Validators.FloatRangeValidator(-2f, 2f)); + rangedZOffset.VisibilityPredicate = delegate { return settingsGroup_Drawing; }; + + meleeMirrored = Settings.GetHandle("meleeMirrored", "DW_Setting_MeleeMirrored_Title".Translate(), "DW_Setting_MeleeMirrored_Description".Translate(), true); + meleeMirrored.VisibilityPredicate = delegate { return settingsGroup_Drawing; }; + + rangedMirrored = Settings.GetHandle("rangedMirrored", "DW_Setting_RangedMirrored_Title".Translate(), "DW_Setting_RangedMirrored_Description".Translate(), true); + rangedMirrored.VisibilityPredicate = delegate { return settingsGroup_Drawing; }; + + + customRotations = Settings.GetHandle("customRotations", "DW_Setting_CustomRotations_Title".Translate(), "", null); + customRotations.CustomDrawer = rect => { return GUIDrawUtility.CustomDrawer_MatchingThingDefs_dialog(rect, customRotations, GetRotationDefaults(allWeapons), allWeapons, "DW_Setting_CustomRotations_Header".Translate()); }; + customRotations.VisibilityPredicate = delegate { return settingsGroup_Drawing; }; + + if (customRotations.Value != null) + { + if (customRotations.Value.inner.Count < allWeapons.Count) + AddMissingWeaponsForRotationSelection(allWeapons); + if (customRotations.Value.inner.Count > allWeapons.Count) + { + RemoveDepricatedRecords(allWeapons, customRotations.Value.inner); + } + } + + //settingsGroup_DualWield + settingsGroup_DualWield = Settings.GetHandle("settingsGroup_DualWieldSelection", "DW_SettingsGroup_DualWieldSelection_Title".Translate(), "DW_SettingsGroup_DualWieldSelection_Description".Translate(), false); + settingsGroup_DualWield.CustomDrawer = rect => { return GUIDrawUtility.CustomDrawer_Button(rect, settingsGroup_DualWield, "DW_Expand".Translate() + "..", "DW_Collapse".Translate()); }; + dualWieldSelection = Settings.GetHandle("dualWieldSelection", "", "", null); + if (dualWieldSelection.Value != null) + { + if(dualWieldSelection.Value.inner.Count < allWeapons.Count) + AddMissingWeaponsForDualWieldSelection(allWeapons); + if(dualWieldSelection.Value.inner.Count > allWeapons.Count) + { + RemoveDepricatedRecords(allWeapons, dualWieldSelection.Value.inner); + } + } + dualWieldSelection.CustomDrawer = rect => { return GUIDrawUtility.CustomDrawer_MatchingThingDefs_active(rect, dualWieldSelection, GetDualWieldDefaults(allWeapons), allWeapons, "DW_Setting_DualWield_OK".Translate(), "DW_Setting_DualWield_NOK".Translate(), twoHandSelection.Value != null ? twoHandSelection.Value.inner : null, "DW_Setting_DualWield_DisabledReason".Translate()); }; + dualWieldSelection.VisibilityPredicate = delegate { return settingsGroup_DualWield; }; + + //settingsGroup_TwoHand + settingsGroup_TwoHand = Settings.GetHandle("settingsGroup_TwoHandSelection", "DW_SettingsGroup_TwoHandSelection_Title".Translate(), "DW_SettingsGroup_TwoHandSelection_Description".Translate(), false); + settingsGroup_TwoHand.CustomDrawer = rect => { return GUIDrawUtility.CustomDrawer_Button(rect, settingsGroup_TwoHand, "DW_Expand".Translate() + "..", "DW_Collapse".Translate()); }; + twoHandSelection = Settings.GetHandle("twoHandSelection", "", "", null); + if (twoHandSelection.Value != null) + { + if(twoHandSelection.Value.inner.Count < allWeapons.Count) + { + AddMissingWeaponsForTwoHandSelection(allWeapons); + } + if (twoHandSelection.Value.inner.Count > allWeapons.Count) + { + RemoveDepricatedRecords(allWeapons, twoHandSelection.Value.inner); + } + } + twoHandSelection.CustomDrawer = rect => { return GUIDrawUtility.CustomDrawer_MatchingThingDefs_active(rect, twoHandSelection, GetTwoHandDefaults(allWeapons), allWeapons, "DW_Setting_TwoHanded_OK".Translate(), "DW_Setting_TwoHanded_NOK".Translate(), dualWieldSelection.Value != null ? dualWieldSelection.Value.inner : null, "DW_Setting_TwoHand_DisabledReason".Translate()); }; + twoHandSelection.VisibilityPredicate = delegate { return settingsGroup_TwoHand; }; + + //settingsGroup_Penalties + settingsGroup_Penalties = Settings.GetHandle("settingsGroup_Penalties", "DW_SettingsGroup_Penalties_Title".Translate(), "DW_SettingsGroup_Penalties_Description".Translate(), false); + settingsGroup_Penalties.CustomDrawer = rect => { return GUIDrawUtility.CustomDrawer_Button(rect, settingsGroup_Penalties, "DW_Expand".Translate() + "..", "DW_Collapse".Translate()); }; + staticCooldownPOffHand = Settings.GetHandle("staticCooldownPenOffHand", "DW_Setting_StaticCooldownPenOffHand_Title".Translate(), "DW_Setting_StaticCooldownPenOffHand_Description".Translate(), 20f, Validators.FloatRangeValidator(0, 500f)); + staticCooldownPOffHand.VisibilityPredicate = delegate { return settingsGroup_Penalties; }; + staticCooldownPMainHand = Settings.GetHandle("staticCooldownPMainHand", "DW_Setting_StaticCooldownPMainHand_Title".Translate(), "DW_Setting_StaticCooldownPMainHand_Description".Translate(), 10f, Validators.FloatRangeValidator(0, 500f)); + staticCooldownPMainHand.VisibilityPredicate = delegate { return settingsGroup_Penalties; }; + staticAccPOffHand = Settings.GetHandle("staticAccPOffHand", "DW_Setting_StaticAccPOffHand_Title".Translate(), "DW_Setting_StaticAccPOffHand_Description".Translate(), 10f, Validators.FloatRangeValidator(0, 500f)); + staticAccPOffHand.VisibilityPredicate = delegate { return settingsGroup_Penalties; }; + staticAccPMainHand = Settings.GetHandle("staticAccPMainHand", "DW_Setting_StaticAccPMainHand_Title".Translate(), "DW_Setting_StaticAccPMainHand_Description".Translate(), 10f, Validators.FloatRangeValidator(0, 500f)); + staticAccPMainHand.VisibilityPredicate = delegate { return settingsGroup_Penalties; }; + dynamicCooldownP = Settings.GetHandle("dynamicCooldownP", "DW_Setting_DynamicCooldownP_Title".Translate(), "DW_Setting_DynamicCooldownP_Description".Translate(), 5f, Validators.FloatRangeValidator(0, 100f)); + dynamicCooldownP.VisibilityPredicate = delegate { return settingsGroup_Penalties; }; + dynamicAccP = Settings.GetHandle("dynamicAccP", "DW_Setting_DynamicAccP_Title".Translate(), "DW_Setting_DynamicAccP_Description".Translate(), 0.5f, Validators.FloatRangeValidator(0, 10f)); + dynamicAccP.VisibilityPredicate = delegate { return settingsGroup_Penalties; }; + + NPCDualWieldChance = Settings.GetHandle("NPCDualWieldChance", "DW_Setting_NPCDualWieldChance_Title".Translate(), "DW_Setting_NPCDualWieldChance_Description".Translate(), 40, Validators.IntRangeValidator(0, 100)); + + + if (customRotations.Value == null) + { + customRotations.Value = new DictRecordHandler(); + customRotations.Value.inner = GetRotationDefaults(allWeapons); + } + if(twoHandSelection.Value == null) + { + twoHandSelection.Value = new DictRecordHandler(); + twoHandSelection.Value.inner = GetTwoHandDefaults(allWeapons); + } + if(dualWieldSelection.Value == null) + { + dualWieldSelection.Value = new DictRecordHandler(); + dualWieldSelection.Value.inner = GetDualWieldDefaults(allWeapons); + } + } + + private static void RemoveDepricatedRecords(List allWeapons, Dictionary dict) + { + List shouldRemove = new List(); + foreach (string key in from string defName in dict.Keys where !allWeapons.Exists((ThingDef td) => td.defName == defName) select defName) + { + shouldRemove.Add(key); + } + foreach(string key in shouldRemove) + { + dict.Remove(key); + } + } + + private static void AddMissingWeaponsForRotationSelection(List allWeapons) + { + foreach (ThingDef weapon in from td in allWeapons where !customRotations.Value.inner.ContainsKey(td.defName) select td) + { + SetRotationDefault(customRotations.Value.inner, weapon); + } + } + private static void AddMissingWeaponsForDualWieldSelection(List allWeapons) + { + foreach (ThingDef weapon in from td in allWeapons where !dualWieldSelection.Value.inner.ContainsKey(td.defName) select td) + { + SetDualWieldDefault(dualWieldSelection.Value.inner, weapon); + } + } + + private static void AddMissingWeaponsForTwoHandSelection(List allWeapons) + { + foreach (ThingDef weapon in from td in allWeapons where !twoHandSelection.Value.inner.ContainsKey(td.defName) select td) + { + SetTwoHandDefault(twoHandSelection.Value.inner, weapon); + } + } + + private static Dictionary GetRotationDefaults(List allWeapons) + { + Dictionary dict = new Dictionary(); + foreach (ThingDef td in allWeapons) + { + SetRotationDefault(dict, td); + } + return dict; + } + + private static void SetRotationDefault(Dictionary dict, ThingDef td) + { + Record record = new Record(false, td.label); + if (td.GetModExtension() is DefModextension_CustomRotation modExt) + { + record.extraRotation = modExt.extraRotation; + record.isSelected = true; + } + dict.Add(td.defName, record); + } + + private static Dictionary GetDualWieldDefaults(List allWeapons) + { + Dictionary dict = new Dictionary(); + foreach(ThingDef td in allWeapons) + { + SetDualWieldDefault(dict, td); + } + return dict; + } + + private static void SetDualWieldDefault(Dictionary dict, ThingDef td) + { + if (td.GetModExtension() is DefModextension_DefaultSettings modExt) + { + dict.Add(td.defName, new Record(modExt.dualWield, td.label)); + } + else if (td.defName.Contains("Bow_") || td.defName.Contains("Blowgun") || td.GetStatValueAbstract(StatDefOf.Mass) > 3f || (td.IsMeleeWeapon && td.GetStatValueAbstract(StatDefOf.Mass) > 1.5f)) + { + dict.Add(td.defName, new Record(false, td.label)); + } + else + { + dict.Add(td.defName, new Record(true, td.label)); + } + } + + private static Dictionary GetTwoHandDefaults(List allWeapons) + { + Dictionary dict = new Dictionary(); + foreach (ThingDef td in allWeapons) + { + SetTwoHandDefault(dict, td); + } + return dict; + } + + private static void SetTwoHandDefault(Dictionary dict, ThingDef td) + { + if (td.GetModExtension() is DefModextension_DefaultSettings modExt) + { + dict.Add(td.defName, new Record(modExt.twoHand, td.label)); + } + else if (td.defName.Contains("Bow") || td.defName.Contains("Shotgun") || td.GetStatValueAbstract(StatDefOf.Mass) > 3f) + { + dict.Add(td.defName, new Record(true, td.label)); + } + else + { + dict.Add(td.defName, new Record(false, td.label)); + } + } + + private static List GetAllWeapons() + { + List allWeapons = new List(); + + Predicate isWeapon = (ThingDef td) => td.equipmentType == EquipmentType.Primary && !td.destroyOnDrop; + foreach (ThingDef thingDef in from td in DefDatabase.AllDefs + where isWeapon(td) + select td) + { + allWeapons.Add(thingDef); + } + return allWeapons; + } + + public override void MapComponentsInitializing(Map map) + { + _extendedDataStorage = Find.World.GetComponent(); + base.MapComponentsInitializing(map); + } + public override void WorldLoaded() + { + //Failsafe if other mods prevent the store from being loaded during MapComponentsInitializing + if (_extendedDataStorage == null) + { + _extendedDataStorage = Find.World.GetComponent(); + } + base.WorldLoaded(); + } + public ExtendedDataStorage GetExtendedDataStorage() + { + return _extendedDataStorage; + } + + } +} diff --git a/1.4/Source/DualWield/Command_DualWield.cs b/1.4/Source/DualWield/Command_DualWield.cs new file mode 100644 index 0000000..07b55e4 --- /dev/null +++ b/1.4/Source/DualWield/Command_DualWield.cs @@ -0,0 +1,72 @@ +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using Verse; +using Verse.Sound; + +namespace DualWield +{ + public class Command_DualWield : Command_VerbTarget + { + private Thing offHandThing; + private Verb offHandVerb; + public Command_DualWield(Thing offHandThing) + { + this.offHandThing = offHandThing; + if (this.offHandThing.TryGetComp() is CompEquippable ce) + { + offHandVerb = ce.PrimaryVerb; + } + } + + public override float GetWidth(float maxWidth) + { + return base.GetWidth(maxWidth); + } + public override GizmoResult GizmoOnGUI(Vector2 topLeft, float maxWidth, GizmoRenderParms parms) + { + GizmoResult res = base.GizmoOnGUI(topLeft, maxWidth, parms); + GUI.color = offHandThing.DrawColor; + Material material = (!this.disabled) ? null : TexUI.GrayscaleGUI; + Texture2D tex = offHandThing.def.uiIcon; + if (tex == null) + { + tex = BaseContent.BadTex; + } + Rect rect = new Rect(topLeft.x, topLeft.y + 10, this.GetWidth(maxWidth), 75f); + Widgets.DrawTextureFitted(rect, tex, this.iconDrawScale * 0.85f, this.iconProportions, this.iconTexCoords, this.iconAngle, material); + GUI.color = Color.white; + return res; + } + + public override void GizmoUpdateOnMouseover() + { + base.GizmoUpdateOnMouseover(); + this.offHandVerb.verbProps.DrawRadiusRing(this.offHandVerb.caster.Position); + } + public override void ProcessInput(Event ev) + { + base.ProcessInput(ev); + if (offHandVerb.IsMeleeAttack) + { + return; + } + Targeter targeter = Find.Targeter; + if (this.offHandVerb.CasterIsPawn && targeter.targetingSource != null && targeter.targetingSource.GetVerb.verbProps == this.offHandVerb.verbProps) + { + Pawn casterPawn = this.offHandVerb.CasterPawn; + if (!targeter.IsPawnTargeting(casterPawn)) + { + targeter.targetingSourceAdditionalPawns.Add(casterPawn); + } + } + else + { + Find.Targeter.BeginTargeting(this.offHandVerb); + } + } + } +} diff --git a/1.4/Source/DualWield/DW_DefOff.cs b/1.4/Source/DualWield/DW_DefOff.cs new file mode 100644 index 0000000..36a23a2 --- /dev/null +++ b/1.4/Source/DualWield/DW_DefOff.cs @@ -0,0 +1,17 @@ +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield +{ + [DefOf] + public static class DW_DefOff + { + public static JobDef DW_EquipOffhand; + public static ConceptDef DW_Penalties; + public static ConceptDef DW_Settings; + } +} diff --git a/1.4/Source/DualWield/DualWield.csproj b/1.4/Source/DualWield/DualWield.csproj new file mode 100644 index 0000000..f730098 --- /dev/null +++ b/1.4/Source/DualWield/DualWield.csproj @@ -0,0 +1,128 @@ + + + + Debug + AnyCPU + {6FD54C83-31D8-4465-B8BC-9EA2E6EBC1E6} + Library + Properties + DualWield + DualWield + net472 + 512 + false + + + + false + none + false + C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.4\Assemblies\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + false + false + 1.3.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.2.2 + + + 10.0.1 + runtime + compile; build; native; contentfiles; analyzers; buildtransitive + + + 1.0.3 + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + $(PkgKrafs_Rimworld_Ref)\ref\net472\Assembly-CSharp.dll + $(PkgKrafs_Rimworld_Ref)\ref\net472\ + $(PubliciseOutputPath)Assembly-CSharp_publicised.dll + + + + + false + $(AssemblyCSharp_Publicised) + true + false + + + + + + + + + + \ No newline at end of file diff --git a/1.4/Source/DualWield/DualWield.sln b/1.4/Source/DualWield/DualWield.sln new file mode 100644 index 0000000..0138538 --- /dev/null +++ b/1.4/Source/DualWield/DualWield.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26730.16 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DualWield", "DualWield.csproj", "{6FD54C83-31D8-4465-B8BC-9EA2E6EBC1E6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6FD54C83-31D8-4465-B8BC-9EA2E6EBC1E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6FD54C83-31D8-4465-B8BC-9EA2E6EBC1E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6FD54C83-31D8-4465-B8BC-9EA2E6EBC1E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6FD54C83-31D8-4465-B8BC-9EA2E6EBC1E6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {77143D90-B94D-41E8-80F3-DD09C7B81C9D} + EndGlobalSection +EndGlobal diff --git a/1.4/Source/DualWield/Extensions/Ext_Pawn.cs b/1.4/Source/DualWield/Extensions/Ext_Pawn.cs new file mode 100644 index 0000000..354f85d --- /dev/null +++ b/1.4/Source/DualWield/Extensions/Ext_Pawn.cs @@ -0,0 +1,127 @@ +using DualWield.Stances; +using DualWield.Storage; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield +{ + public static class Ext_Pawn + { + public static Pawn_StanceTracker GetStancesOffHand(this Pawn instance) + { + if(Base.Instance.GetExtendedDataStorage() is ExtendedDataStorage store) + { + return store.GetExtendedDataFor(instance).stancesOffhand; + } + return null; + } + public static void SetStancesOffHand(this Pawn instance, Pawn_StanceTracker stancesOffHand) + { + if (Base.Instance.GetExtendedDataStorage() is ExtendedDataStorage store) + { + store.GetExtendedDataFor(instance).stancesOffhand = stancesOffHand; + } + } + public static void TryStartOffHandAttack(this Pawn __instance, LocalTargetInfo targ, ref bool __result) + { + Log.Message("try start offhand attack"); + if(__instance.equipment == null || !__instance.equipment.TryGetOffHandEquipment(out ThingWithComps offHandEquip)) + { + Log.Message("no offhand equp"); + return; + } + var offhandStance = __instance.GetStancesOffHand(); + if (offhandStance.curStance is Stance_Warmup_DW || offhandStance.curStance is Stance_Cooldown) + { + Log.Message($"On cooldown or mobile {offhandStance.curStance}"); + return; + } + if (__instance.story != null && __instance.story.DisabledWorkTagsBackstoryAndTraits.HasFlag(WorkTags.Violent)) + { + Log.Message("not violent"); + return; + } + if (__instance.jobs.curDriver.GetType().Name.Contains("Ability"))//Compatbility for Jecstools' abilities. + { + Log.Message("driver contains ability"); + return; + } + Log.Message("Cur offhand stance: " + __instance.GetStancesOffHand().curStance.GetType().Name); + bool allowManualCastWeapons = !__instance.IsColonist; + Verb verb = __instance.TryGetOffhandAttackVerb(targ.Thing, true); + + if (verb != null) + { + bool success = verb.OffhandTryStartCastOn(targ); + __result = __result || (verb != null && success); + } + } + public static Verb TryGetOffhandAttackVerb(this Pawn instance, Thing target, bool allowManualCastWeapons = false) + { + Pawn_EquipmentTracker equipment = instance.equipment; + ThingWithComps offHandEquip = null; + CompEquippable compEquippable = null; + if (equipment != null && equipment.TryGetOffHandEquipment(out ThingWithComps result) && result != equipment.Primary) + { + Log.Message("returning offhand attack verb"); + offHandEquip = result;//TODO: replace this temp code. + compEquippable = offHandEquip.TryGetComp(); + } + if (compEquippable != null && compEquippable.PrimaryVerb.Available() && (!compEquippable.PrimaryVerb.verbProps.onlyManualCast || (instance.CurJob != null && instance.CurJob.def != JobDefOf.Wait_Combat) || allowManualCastWeapons)) + { + Log.Message("returning primary verb"); + return compEquippable.PrimaryVerb; + } + else + { + return instance.TryGetMeleeVerbOffHand(target); + } + } + public static bool HasMissingArmOrHand(this Pawn instance) + { + bool hasMissingHand = false; + foreach (Hediff_MissingPart missingPart in instance.health.hediffSet.GetMissingPartsCommonAncestors()) + { + if (missingPart.Part.def == BodyPartDefOf.Hand || missingPart.Part.def == BodyPartDefOf.Arm) + { + hasMissingHand = true; + } + } + return hasMissingHand; + } + public static Verb TryGetMeleeVerbOffHand(this Pawn instance, Thing target) + { + + List usableVerbs = new List(); + if (instance.equipment != null && instance.equipment.TryGetOffHandEquipment(out ThingWithComps offHandEquip)) + { + CompEquippable comp = offHandEquip.GetComp(); + //if(comp.AllVerbs.First((Verb verb) => verb.bu + if (comp != null) + { + List allVerbs = comp.AllVerbs; + if (allVerbs != null) + { + for (int k = 0; k < allVerbs.Count; k++) + { + if (allVerbs[k].IsStillUsableBy(instance)) + { + usableVerbs.Add(new VerbEntry(allVerbs[k], instance)); + } + } + } + } + } + if(usableVerbs.TryRandomElementByWeight((VerbEntry ve) => ve.GetSelectionWeight(target), out VerbEntry result)) + { + return result.verb; + } + return null; + } + + } +} diff --git a/1.4/Source/DualWield/Extensions/Ext_Pawn_EquipmentTracker.cs b/1.4/Source/DualWield/Extensions/Ext_Pawn_EquipmentTracker.cs new file mode 100644 index 0000000..e0ca308 --- /dev/null +++ b/1.4/Source/DualWield/Extensions/Ext_Pawn_EquipmentTracker.cs @@ -0,0 +1,67 @@ +using DualWield.Storage; +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield +{ + static class Ext_Pawn_EquipmentTracker + { + //Tag offhand equipment so it can be recognised as offhand equipment during later evaluations. + public static void AddOffHandEquipment(this Pawn_EquipmentTracker instance, ThingWithComps newEq) + { + ThingOwner equipment = Traverse.Create(instance).Field("equipment").GetValue>(); + ExtendedDataStorage store = Base.Instance.GetExtendedDataStorage(); + if(store != null) + { + store.GetExtendedDataFor(newEq).isOffHand = true; + LessonAutoActivator.TeachOpportunity(DW_DefOff.DW_Penalties, OpportunityType.GoodToKnow); + LessonAutoActivator.TeachOpportunity(DW_DefOff.DW_Settings, OpportunityType.GoodToKnow); + equipment.TryAdd(newEq, true); + } + + } + //Only returns true when offhand weapon is used alongside a mainhand weapon. + public static bool TryGetOffHandEquipment(this Pawn_EquipmentTracker instance, out ThingWithComps result) + { + result = null; + if (instance.pawn.HasMissingArmOrHand()) + { + return false; + } + ExtendedDataStorage store = Base.Instance.GetExtendedDataStorage(); + foreach (ThingWithComps twc in instance.AllEquipmentListForReading) + { + if (store.TryGetExtendedDataFor(twc, out ExtendedThingWithCompsData ext) && ext.isOffHand) + { + result = twc; + return true; + } + } + return false; + } + public static void MakeRoomForOffHand(this Pawn_EquipmentTracker instance, ThingWithComps eq) + { + instance.TryGetOffHandEquipment(out ThingWithComps currentOffHand); + if (currentOffHand != null) + { + ThingWithComps thingWithComps; + if (instance.TryDropEquipment(currentOffHand, out thingWithComps, instance.pawn.Position, true)) + { + if (thingWithComps != null) + { + thingWithComps.SetForbidden(false, true); + } + } + else + { + Log.Error(instance.pawn + " couldn't make room for equipment " + eq, false); + } + } + } + } +} diff --git a/1.4/Source/DualWield/Extensions/Ext_ThingDef.cs b/1.4/Source/DualWield/Extensions/Ext_ThingDef.cs new file mode 100644 index 0000000..6a6bb1d --- /dev/null +++ b/1.4/Source/DualWield/Extensions/Ext_ThingDef.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield +{ + public static class Ext_ThingDef + { + public static bool CanBeOffHand(this ThingDef td) + { + return td.IsWeapon && Base.dualWieldSelection.Value != null && Base.dualWieldSelection.Value.inner.TryGetValue(td.defName, out Settings.Record value) && value.isSelected; + } + public static bool IsTwoHand(this ThingDef td) + { + return td.IsWeapon && Base.twoHandSelection.Value != null && Base.twoHandSelection.Value.inner.TryGetValue(td.defName, out Settings.Record value) && value.isSelected; + } + } +} diff --git a/1.4/Source/DualWield/Extensions/Ext_ThingWithComps.cs b/1.4/Source/DualWield/Extensions/Ext_ThingWithComps.cs new file mode 100644 index 0000000..fe586b3 --- /dev/null +++ b/1.4/Source/DualWield/Extensions/Ext_ThingWithComps.cs @@ -0,0 +1,25 @@ +using DualWield.Storage; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield +{ + public static class Ext_ThingWithComps + { + public static bool IsOffHand(this ThingWithComps instance) + { + ExtendedDataStorage store = Base.Instance.GetExtendedDataStorage(); + if(store != null) + { + if(store.TryGetExtendedDataFor(instance, out ExtendedThingWithCompsData twcData)) + { + return twcData.isOffHand; + } + } + return false; + } + } +} diff --git a/1.4/Source/DualWield/Extensions/Ext_Verb.cs b/1.4/Source/DualWield/Extensions/Ext_Verb.cs new file mode 100644 index 0000000..bd5c895 --- /dev/null +++ b/1.4/Source/DualWield/Extensions/Ext_Verb.cs @@ -0,0 +1,48 @@ +using DualWield.Stances; +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield +{ + public static class Ext_Verb + { + public static bool OffhandTryStartCastOn(this Verb instance, LocalTargetInfo castTarg) + { + if (instance.caster == null) + { + return false; + } + if (!instance.caster.Spawned) + { + return false; + } + if (instance.state == VerbState.Bursting || !instance.CanHitTarget(castTarg)) + { + return false; + } + Traverse.Create(instance).Field("currentTarget").SetValue(castTarg); + if (instance.CasterIsPawn && instance.verbProps.warmupTime > 0f) + { + ShootLine newShootLine; + if (!instance.TryFindShootLineFromTo(instance.caster.Position, castTarg, out newShootLine)) + { + return false; + } + instance.CasterPawn.Drawer.Notify_WarmingCastAlongLine(newShootLine, instance.caster.Position); + float statValue = instance.CasterPawn.GetStatValue(StatDefOf.AimingDelayFactor, true); + int ticks = (instance.verbProps.warmupTime * statValue).SecondsToTicks(); + instance.CasterPawn.GetStancesOffHand().SetStance(new Stance_Warmup_DW(ticks, castTarg, instance)); + } + else + { + instance.WarmupComplete(); + } + return true; + } + } +} diff --git a/1.4/Source/DualWield/Harmony/FloatMenuMakerMap.cs b/1.4/Source/DualWield/Harmony/FloatMenuMakerMap.cs new file mode 100644 index 0000000..49fa029 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/FloatMenuMakerMap.cs @@ -0,0 +1,109 @@ +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using Verse; +using Verse.AI; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(FloatMenuMakerMap), "AddHumanlikeOrders")] + class FloatMenuMakerMap_AddHumanlikeOrders + { + static void Postfix(Vector3 clickPos, Pawn pawn, ref List opts) + { + IntVec3 c = IntVec3.FromVector3(clickPos); + + foreach (LocalTargetInfo current in GenUI.TargetsAt(clickPos, TargetingParameters.ForSelf(pawn), true)) + { + if (pawn.equipment.TryGetOffHandEquipment(out ThingWithComps eq)) + { + FloatMenuOption unequipOffHandOption = new FloatMenuOption("DW_DropOffHand".Translate(eq.LabelShort), new Action(delegate { + pawn.jobs.TryTakeOrderedJob(new Job(JobDefOf.DropEquipment, eq)); + })); //TODO translation + opts.Add(unequipOffHandOption); + } + } + + if (pawn.health.capacities.CapableOf(PawnCapacityDefOf.Manipulation)) + { + if (pawn.equipment != null) + { + ThingWithComps equipment = null; + List thingList = c.GetThingList(pawn.Map); + for (int i = 0; i < thingList.Count; i++) + { + if (thingList[i].TryGetComp() != null) + { + equipment = (ThingWithComps)thingList[i]; + FloatMenuOption equipOffHandOption = GetEquipOffHandOption(pawn, equipment); + opts.Add(equipOffHandOption); + } + } + + } + } + } + + private static FloatMenuOption GetEquipOffHandOption(Pawn pawn, ThingWithComps equipment) + { + string labelShort = equipment.LabelShort; + FloatMenuOption menuItem; + + if (equipment.def.IsWeapon && pawn.story.DisabledWorkTagsBackstoryAndTraits.HasFlag(WorkTags.Violent)) + { + menuItem = new FloatMenuOption("CannotEquip".Translate(labelShort) + " " + "DW_AsOffHand".Translate() + " (" + "IsIncapableOfViolenceLower".Translate(pawn.LabelShort, pawn) + ")", null, MenuOptionPriority.Default, null, null, 0f, null, null); + } + else if (!pawn.CanReach(equipment, PathEndMode.ClosestTouch, Danger.Deadly, false, false, TraverseMode.ByPawn)) + { + menuItem = new FloatMenuOption("CannotEquip".Translate(labelShort) + " " + "DW_AsOffHand".Translate() + " (" + "NoPath".Translate() + ")", null, MenuOptionPriority.Default, null, null, 0f, null, null); + } + else if (!pawn.health.capacities.CapableOf(PawnCapacityDefOf.Manipulation)) + { + menuItem = new FloatMenuOption("CannotEquip".Translate(labelShort) + " " + "DW_AsOffHand".Translate() + " (" + "Incapable".Translate() + ")", null, MenuOptionPriority.Default, null, null, 0f, null, null); + } + else if (equipment.IsBurning()) + { + menuItem = new FloatMenuOption("CannotEquip".Translate(labelShort) + " " + "DW_AsOffHand".Translate() + " (" + "BurningLower".Translate() + ")", null, MenuOptionPriority.Default, null, null, 0f, null, null); + } + else if (pawn.HasMissingArmOrHand()) + { + menuItem = new FloatMenuOption("CannotEquip".Translate(labelShort) + " " + "DW_AsOffHand".Translate() + " ( " +"DW_MissArmOrHand".Translate() + " )", null, MenuOptionPriority.Default, null, null, 0f, null, null); + } + else if (pawn.equipment != null && pawn.equipment.Primary != null && pawn.equipment.Primary.def.IsTwoHand()) + { + menuItem = new FloatMenuOption("CannotEquip".Translate(labelShort) + " " + "DW_AsOffHand".Translate() + " ( " + "DW_WieldingTwoHanded".Translate() + ")", null, MenuOptionPriority.Default, null, null, 0f, null, null); + } + else if (equipment.def.IsTwoHand()) + { + menuItem = new FloatMenuOption("CannotEquip".Translate(labelShort) + " " + "DW_AsOffHand".Translate() + " ( " + "DW_NoTwoHandedInOffHand".Translate() + ")", null, MenuOptionPriority.Default, null, null, 0f, null, null); + } + else if (!equipment.def.CanBeOffHand()) + { + menuItem = new FloatMenuOption("CannotEquip".Translate(labelShort) + " " + "DW_AsOffHand".Translate() + " ( " + "DW_CannotBeOffHand".Translate() + ")", null, MenuOptionPriority.Default, null, null, 0f, null, null); + } + else + { + string text5 = "DW_EquipOffHand".Translate(labelShort); + if (equipment.def.IsRangedWeapon && pawn.story != null && pawn.story.traits.HasTrait(TraitDefOf.Brawler)) + { + text5 = text5 + " " + "EquipWarningBrawler".Translate(); + } + menuItem = FloatMenuUtility.DecoratePrioritizedTask(new FloatMenuOption(text5, delegate + { + equipment.SetForbidden(false, true); + pawn.jobs.TryTakeOrderedJob(new Job(DW_DefOff.DW_EquipOffhand, equipment), JobTag.Misc); + FleckMaker.Static(equipment.DrawPos, equipment.Map, FleckDefOf.FeedbackEquip, 1f); + PlayerKnowledgeDatabase.KnowledgeDemonstrated(ConceptDefOf.EquippingWeapons, KnowledgeAmount.Total); + }, MenuOptionPriority.High, null, null, 0f, null, null), pawn, equipment, "ReservedBy"); + } + + return menuItem; + } + + + } +} diff --git a/1.4/Source/DualWield/Harmony/Jobdriver_Wait.cs b/1.4/Source/DualWield/Harmony/Jobdriver_Wait.cs new file mode 100644 index 0000000..45c8a22 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/Jobdriver_Wait.cs @@ -0,0 +1,43 @@ +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection.Emit; +using System.Text; +using Verse; +using Verse.AI; + +namespace DualWield.Harmony +{ + + [HarmonyPatch(typeof(JobDriver_Wait), "CheckForAutoAttack")] + public class Jobdriver_Wait_CheckForAutoAttack + { + static IEnumerable Transpiler(IEnumerable instructions) + { + var instructionsList = new List(instructions); + foreach (CodeInstruction instruction in instructionsList) + { + if(instruction.operand == typeof(Pawn_StanceTracker).GetMethod("get_FullBodyBusy")) + { + yield return new CodeInstruction(OpCodes.Call, typeof(Jobdriver_Wait_CheckForAutoAttack).GetMethod("FullBodyAndOffHandBusy")); + } + else + { + yield return instruction; + } + } + + } + public static bool FullBodyAndOffHandBusy(Pawn_StanceTracker instance) + { + if(instance.pawn.GetStancesOffHand() is Pawn_StanceTracker stOffHand && instance.pawn.equipment != null && instance.pawn.equipment.TryGetOffHandEquipment(out ThingWithComps twc)) + { + return stOffHand.FullBodyBusy && instance.FullBodyBusy; + } + return instance.FullBodyBusy; + } + } + + +} diff --git a/1.4/Source/DualWield/Harmony/Pawn.cs b/1.4/Source/DualWield/Harmony/Pawn.cs new file mode 100644 index 0000000..faf7a97 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/Pawn.cs @@ -0,0 +1,61 @@ +using DualWield.Stances; +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + //Tick the stance tracker of the offfhand weapon + [HarmonyPatch(typeof(Pawn), "Tick")] + class Pawn_Tick + { + static void Postfix(Pawn __instance) + { + if (!__instance.Suspended) + { + if (__instance.Spawned && __instance.GetStancesOffHand() is Pawn_StanceTracker stancesOffHand) + { + stancesOffHand.StanceTrackerTick(); + } + } + } + } + //Also try start off hand weapons attack when trystartattack is called + [HarmonyPatch(typeof(Pawn), "TryStartAttack")] + class Pawn_TryStartAttack + { + static void Postfix(Pawn __instance, LocalTargetInfo targ, ref bool __result) + { + //Check if it's an enemy that's attacked, and not a fire or an arguing husband + if ((!__instance.InMentalState && !(targ.Thing is Fire))) + { + __instance.TryStartOffHandAttack(targ, ref __result); + } + } + } + + //If main weapon has shorter range than off hand weapon, use offhand weapon instead. + [HarmonyPatch(typeof(Pawn), "get_CurrentEffectiveVerb")] + class Pawn_get_CurrentEffectiveVerb + { + static void Postfix(Pawn __instance, ref Verb __result) + { + if (__instance.MannedThing() == null && + __instance.equipment != null && + __instance.equipment.TryGetOffHandEquipment(out ThingWithComps offHandEquip) && + !offHandEquip.def.IsMeleeWeapon && + offHandEquip.TryGetComp() is CompEquippable compEquip) + { + Verb verb = compEquip.PrimaryVerb; + if (__result.IsMeleeAttack || __result.verbProps.range < verb.verbProps.range) + { + __result = verb; + } + } + } + } +} diff --git a/1.4/Source/DualWield/Harmony/PawnComponentsUtility.cs b/1.4/Source/DualWield/Harmony/PawnComponentsUtility.cs new file mode 100644 index 0000000..21a4dc0 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/PawnComponentsUtility.cs @@ -0,0 +1,22 @@ +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(PawnComponentsUtility), "AddComponentsForSpawn")] + class PawnComponentsUtility_AddComponentsForSpawn + { + static void Postfix(Pawn pawn) + { + if (!(pawn.GetStancesOffHand() is Pawn_StanceTracker stancesOffHand)) + { + pawn.SetStancesOffHand(new Pawn_StanceTracker(pawn)); + } + } + } +} diff --git a/1.4/Source/DualWield/Harmony/PawnRenderer.cs b/1.4/Source/DualWield/Harmony/PawnRenderer.cs new file mode 100644 index 0000000..11d11c9 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/PawnRenderer.cs @@ -0,0 +1,250 @@ +using DualWield.Settings; +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection.Emit; +using System.Text; +using UnityEngine; +using Verse; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(PawnRenderer), "RenderPawnAt")] + class PawnRenderer_RenderPawnAt + { + static void Postfix(PawnRenderer __instance, ref Pawn ___pawn) + { + if (___pawn.Spawned && !___pawn.Dead) + { + ___pawn.GetStancesOffHand().StanceTrackerDraw(); + } + } + + } + [HarmonyPatch(typeof(PawnRenderer), "DrawEquipmentAiming")] + public class PawnRenderer_DrawEquipmentAiming + { + /* + static IEnumerable Transpiler(IEnumerable instructions) + { + var instructionsList = new List(instructions); + foreach (CodeInstruction instruction in instructionsList) + { + if (instruction.operand == typeof(PawnRenderer).GetMethod("DrawEquipmentAiming")) + { + yield return new CodeInstruction(OpCodes.Call, typeof(PawnRenderer_DrawEquipment).GetMethod("DrawEquipmentAimingModified")); + } + else + { + yield return instruction; + } + } + } + */ + static bool Prefix(PawnRenderer __instance, Thing eq, ref Vector3 drawLoc, ref float aimAngle, ref Pawn ___pawn) + { + ThingWithComps offHandEquip = null; + if (___pawn.equipment == null) + { + return true; + } + if (___pawn.equipment.TryGetOffHandEquipment(out ThingWithComps result)) + { + offHandEquip = result; + } + if(offHandEquip == null) + { + return true; + } + float mainHandAngle = aimAngle; + float offHandAngle = aimAngle; + Stance_Busy mainStance = ___pawn.stances.curStance as Stance_Busy; + Stance_Busy offHandStance = null; + if (___pawn.GetStancesOffHand() != null) + { + offHandStance = ___pawn.GetStancesOffHand().curStance as Stance_Busy; + } + LocalTargetInfo focusTarg = null; + if (mainStance != null && !mainStance.neverAimWeapon) + { + focusTarg = mainStance.focusTarg; + } + else if (offHandStance != null && !offHandStance.neverAimWeapon) + { + focusTarg = offHandStance.focusTarg; + } + + bool mainHandAiming = CurrentlyAiming(mainStance); + bool offHandAiming = CurrentlyAiming(offHandStance); + + Vector3 offsetMainHand = new Vector3(); + Vector3 offsetOffHand = new Vector3(); + //bool currentlyAiming = (mainStance != null && !mainStance.neverAimWeapon && mainStance.focusTarg.IsValid) || stancesOffHand.curStance is Stance_Busy ohs && !ohs.neverAimWeapon && ohs.focusTarg.IsValid; + //When wielding offhand weapon, facing south, and not aiming, draw differently + + SetAnglesAndOffsets(eq, offHandEquip, aimAngle, ___pawn, ref offsetMainHand, ref offsetOffHand, ref mainHandAngle, ref offHandAngle, mainHandAiming, offHandAiming); + + if (offHandEquip != ___pawn.equipment.Primary) + { + //drawLoc += offsetMainHand; + //aimAngle = mainHandAngle; + //__instance.DrawEquipmentAiming(eq, drawLoc + offsetMainHand, mainHandAngle); + DrawEquipmentAimingOverride(eq, drawLoc + offsetMainHand, mainHandAngle); + } + if ((offHandAiming || mainHandAiming) && focusTarg != null) + { + offHandAngle = GetAimingRotation(___pawn, focusTarg); + offsetOffHand.y += 0.1f; + Vector3 adjustedDrawPos = ___pawn.DrawPos + new Vector3(0f, 0f, 0.4f).RotatedBy(offHandAngle) + offsetOffHand; + DrawEquipmentAimingOverride(offHandEquip, adjustedDrawPos, offHandAngle); + } + else + { + DrawEquipmentAimingOverride(offHandEquip, drawLoc + offsetOffHand, offHandAngle); + } + return false; + } + + //Copied from vanilla. + public static void DrawEquipmentAimingOverride(Thing eq, Vector3 drawLoc, float aimAngle) + { + float num = aimAngle - 90f; + Mesh mesh; + if (aimAngle > 20f && aimAngle < 160f) + { + mesh = MeshPool.plane10; + num += eq.def.equippedAngleOffset; + } + else if (aimAngle > 200f && aimAngle < 340f) + { + mesh = MeshPool.plane10Flip; + num -= 180f; + num -= eq.def.equippedAngleOffset; + } + else + { + mesh = MeshPool.plane10; + num += eq.def.equippedAngleOffset; + } + num %= 360f; + Graphic_StackCount graphic_StackCount = eq.Graphic as Graphic_StackCount; + Material matSingle; + if (graphic_StackCount != null) + { + matSingle = graphic_StackCount.SubGraphicForStackCount(1, eq.def).MatSingle; + } + else + { + matSingle = eq.Graphic.MatSingle; + } + Graphics.DrawMesh(mesh, drawLoc, Quaternion.AngleAxis(num, Vector3.up), matSingle, 0); + } + + private static void SetAnglesAndOffsets(Thing eq, ThingWithComps offHandEquip, float aimAngle, Pawn pawn, ref Vector3 offsetMainHand, ref Vector3 offsetOffHand, ref float mainHandAngle, ref float offHandAngle, bool mainHandAiming, bool offHandAiming) + { + bool offHandIsMelee = IsMeleeWeapon(offHandEquip); + bool mainHandIsMelee = IsMeleeWeapon(pawn.equipment.Primary); + float meleeAngleFlipped = Base.meleeMirrored ? 360 - Base.meleeAngle : Base.meleeAngle; + float rangedAngleFlipped = Base.rangedMirrored ? 360 - Base.rangedAngle : Base.rangedAngle; + + if (pawn.Rotation == Rot4.East) + { + offsetOffHand.y = -1f; + offsetOffHand.z = 0.1f; + } + else if (pawn.Rotation == Rot4.West) + { + offsetMainHand.y = -1f; + //zOffsetMain = 0.25f; + offsetOffHand.z = -0.1f; + } + else if (pawn.Rotation == Rot4.North) + { + if (!mainHandAiming && !offHandAiming) + { + offsetMainHand.x = mainHandIsMelee ? Base.meleeXOffset : Base.rangedXOffset; + offsetOffHand.x = offHandIsMelee ? -Base.meleeXOffset : -Base.rangedXOffset; + offsetMainHand.z = mainHandIsMelee ? Base.meleeZOffset : Base.rangedZOffset; + offsetOffHand.z = offHandIsMelee ? -Base.meleeZOffset : -Base.rangedZOffset; + offHandAngle = offHandIsMelee ? Base.meleeAngle : Base.rangedAngle; + mainHandAngle = mainHandIsMelee ? meleeAngleFlipped : rangedAngleFlipped; + + } + else + { + offsetOffHand.x = -0.1f; + } + } + else + { + if (!mainHandAiming && !offHandAiming) + { + offsetMainHand.y = 1f; + offsetMainHand.x = mainHandIsMelee ? -Base.meleeXOffset : -Base.rangedXOffset; + offsetOffHand.x = offHandIsMelee ? Base.meleeXOffset : Base.rangedXOffset; + offsetMainHand.z = mainHandIsMelee ? -Base.meleeZOffset : -Base.rangedZOffset; + offsetOffHand.z = offHandIsMelee ? Base.meleeZOffset : Base.rangedZOffset; + offHandAngle = offHandIsMelee ? meleeAngleFlipped : rangedAngleFlipped; + mainHandAngle = mainHandIsMelee ? Base.meleeAngle : Base.rangedAngle; + } + else + { + offsetOffHand.x = 0.1f; + } + } + if (!pawn.Rotation.IsHorizontal) + { + if (Base.customRotations.Value.inner.TryGetValue((offHandEquip.def.defName), out Record offHandValue)) + { + offHandAngle += pawn.Rotation == Rot4.North ? offHandValue.extraRotation : -offHandValue.extraRotation; + //offHandAngle %= 360; + } + if (Base.customRotations.Value.inner.TryGetValue((eq.def.defName), out Record mainHandValue)) + { + mainHandAngle += pawn.Rotation == Rot4.North ? -mainHandValue.extraRotation : mainHandValue.extraRotation; + //mainHandAngle %= 360; + } + } + } + + private static float GetAimingRotation(Pawn pawn, LocalTargetInfo focusTarg) + { + Vector3 a; + if (focusTarg.HasThing) + { + a = focusTarg.Thing.DrawPos; + } + else + { + a =focusTarg.Cell.ToVector3Shifted(); + } + float num = 0f; + if ((a - pawn.DrawPos).MagnitudeHorizontalSquared() > 0.001f) + { + num = (a - pawn.DrawPos).AngleFlat(); + } + + return num; + } + private static bool CurrentlyAiming(Stance_Busy stance) + { + return (stance != null && !stance.neverAimWeapon && stance.focusTarg.IsValid); + } + private static bool IsMeleeWeapon(ThingWithComps eq) + { + if(eq == null) + { + return false; + } + if(eq.TryGetComp() is CompEquippable ceq) + { + if (ceq.PrimaryVerb.IsMeleeAttack) + { + return true; + } + } + return false; + } + } +} diff --git a/1.4/Source/DualWield/Harmony/PawnWeaponGenerator.cs b/1.4/Source/DualWield/Harmony/PawnWeaponGenerator.cs new file mode 100644 index 0000000..4849e15 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/PawnWeaponGenerator.cs @@ -0,0 +1,61 @@ +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(PawnWeaponGenerator), "TryGenerateWeaponFor")] + class PawnWeaponGenerator_TryGenerateWeaponFor + { + static void Postfix(Pawn pawn) + { + if (pawn.RaceProps.Humanlike && Rand.Chance(((float)Base.NPCDualWieldChance)/100f)) + { + float randomInRange = pawn.kindDef.weaponMoney.RandomInRange; + List allWeaponPairs = Traverse.Create(typeof(PawnWeaponGenerator)).Field("allWeaponPairs").GetValue>(); + List workingWeapons = Traverse.Create(typeof(PawnWeaponGenerator)).Field("workingWeapons").GetValue>(); + if (pawn.equipment != null && pawn.equipment.Primary != null && pawn.equipment.Primary.def.IsTwoHand()) + { + return; + } + if(pawn.equipment == null || pawn.equipment.Primary == null) + { + return; + } + for (int i = 0; i < allWeaponPairs.Count; i++) + { + ThingStuffPair w = allWeaponPairs[i]; + if (w.Price <= randomInRange) + { + if (pawn.kindDef.weaponTags == null || pawn.kindDef.weaponTags.Any((string tag) => w.thing.weaponTags.Contains(tag))) + { + if (w.thing.generateAllowChance >= 1f || Rand.ChanceSeeded(w.thing.generateAllowChance, pawn.thingIDNumber ^ (int)w.thing.shortHash ^ 28554824)) + { + workingWeapons.Add(w); + } + } + } + } + if (workingWeapons.Count == 0) + { + return; + } + ThingStuffPair thingStuffPair; + IEnumerable matchingWeapons = workingWeapons.Where((ThingStuffPair tsp) => + tsp.thing.CanBeOffHand() && + !tsp.thing.IsTwoHand()); + if (matchingWeapons != null && matchingWeapons.TryRandomElementByWeight((ThingStuffPair w) => w.Commonality * w.Price, out thingStuffPair)) + { + ThingWithComps thingWithComps = (ThingWithComps)ThingMaker.MakeThing(thingStuffPair.thing, thingStuffPair.stuff); + PawnGenerator.PostProcessGeneratedGear(thingWithComps, pawn); + pawn.equipment.AddOffHandEquipment(thingWithComps); + } + + } + } + } +} diff --git a/1.4/Source/DualWield/Harmony/Pawn_EquipmentTracker.cs b/1.4/Source/DualWield/Harmony/Pawn_EquipmentTracker.cs new file mode 100644 index 0000000..95e3cf4 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/Pawn_EquipmentTracker.cs @@ -0,0 +1,93 @@ +using DualWield.Storage; +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Reflection.Emit; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + //This patch prevent an error thrown when a offhand weapon is equipped and the primary weapon is switched. + [HarmonyPatch(typeof(Pawn_EquipmentTracker), "AddEquipment")] + class Pawn_EquipmentTracker_AddEquipment + { + static IEnumerable Transpiler(IEnumerable instructions) + { + var instructionsList = new List(instructions); + foreach (CodeInstruction instruction in instructionsList) + { + if (instruction.operand == typeof(Pawn_EquipmentTracker).GetMethod("get_Primary")) + { + yield return new CodeInstruction(OpCodes.Call, typeof(Pawn_EquipmentTracker_AddEquipment).GetMethod("PrimaryNoOffHand")); + } + else + { + yield return instruction; + } + } + } + //Make sure offhand weapons are never stored first in the list. + static void Postfix(Pawn_EquipmentTracker __instance, ThingWithComps newEq, ref ThingOwner ___equipment) + { + ExtendedDataStorage store = Base.Instance.GetExtendedDataStorage(); + ThingWithComps primary = __instance.Primary; + if (primary != null && store != null && store.TryGetExtendedDataFor(primary, out ExtendedThingWithCompsData twcData) && twcData.isOffHand) + { + if(___equipment != null) + { + ___equipment.Remove(primary); + __instance.AddOffHandEquipment(primary); + } + } + } + public static ThingWithComps PrimaryNoOffHand(Pawn_EquipmentTracker instance) + { + ThingWithComps result = null; + //When there's no offhand weapon equipped, use vanilla behaviour and throw the error when needed. Otherwise, make sure the error is never thrown. + if (!instance.TryGetOffHandEquipment(out ThingWithComps r)) + { + return instance.Primary; + } + return result; + } + } + [HarmonyPatch(typeof(Pawn_EquipmentTracker) ,"MakeRoomFor")] + class Pawn_EquipmentTracker_MakeRoomFor + { + static bool Prefix(Pawn_EquipmentTracker __instance, ThingWithComps eq) + { + bool offHandEquipped = __instance.TryGetOffHandEquipment(out ThingWithComps offHand); + if (offHandEquipped && offHand == __instance.Primary && !eq.def.IsTwoHand()) + { + return false; + } + else + { + if (eq.def.IsTwoHand() && offHandEquipped) + { + DropOffHand(__instance, eq, offHand); + string herHis = __instance.pawn.story.bodyType == BodyTypeDefOf.Male ? "DW_HerHis_Male".Translate() : "DW_HerHis_Female".Translate(); + Messages.Message("DW_Message_UnequippedOffHand".Translate(new object[] { __instance.pawn.Name.ToStringShort, herHis }), new LookTargets(__instance.pawn), MessageTypeDefOf.CautionInput); + } + return true; + } + } + + private static void DropOffHand(Pawn_EquipmentTracker __instance, ThingWithComps eq, ThingWithComps offHand) + { + if (__instance.TryDropEquipment(offHand, out ThingWithComps resultingEq, __instance.pawn.Position)) + { + resultingEq?.SetForbidden(value: false); + } + else + { + Log.Error(__instance.pawn + " couldn't make room for equipment " + eq); + } + } + } + +} diff --git a/1.4/Source/DualWield/Harmony/Pawn_MeleeVerbs.cs b/1.4/Source/DualWield/Harmony/Pawn_MeleeVerbs.cs new file mode 100644 index 0000000..bfd2ff5 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/Pawn_MeleeVerbs.cs @@ -0,0 +1,63 @@ +using DualWield.Stances; +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(Pawn_MeleeVerbs), "GetUpdatedAvailableVerbsList")] + class Pawn_MeleeVerbs_GetUpdatedAvailableVerbsList + { + static void Postfix(ref List __result) + { + //remove all offhand verbs so they're not used by for mainhand melee attacks. + List shouldRemove = new List(); + foreach (VerbEntry ve in __result) + { + if (ve.verb.EquipmentSource != null && ve.verb.EquipmentSource.IsOffHand()) + { + shouldRemove.Add(ve); + } + } + foreach (VerbEntry ve in shouldRemove) + { + __result.Remove(ve); + } + } + } + + [HarmonyPatch(typeof(Pawn_MeleeVerbs),"TryMeleeAttack")] + class Pawn_MeleeVerbs_TryMeleeAttack + { + static void Postfix(Pawn_MeleeVerbs __instance, Thing target, Verb verbToUse, bool surpriseAttack, ref bool __result, ref Pawn ___pawn) + { + if (___pawn.GetStancesOffHand() == null || ___pawn.GetStancesOffHand().curStance is Stance_Warmup_DW || ___pawn.GetStancesOffHand().curStance is Stance_Cooldown) + { + return; + } + if (___pawn.equipment == null || !___pawn.equipment.TryGetOffHandEquipment(out ThingWithComps offHandEquip)) + { + return; + } + if(offHandEquip == ___pawn.equipment.Primary) + { + return; + } + if (___pawn.InMentalState) + { + return; + } + + Verb verb = __instance.Pawn.TryGetMeleeVerbOffHand(target); + if(verb != null) + { + bool success = verb.OffhandTryStartCastOn(target); + __result = __result || (verb != null && success); + } + } + } +} diff --git a/1.4/Source/DualWield/Harmony/Pawn_PathFollower.cs b/1.4/Source/DualWield/Harmony/Pawn_PathFollower.cs new file mode 100644 index 0000000..a91b560 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/Pawn_PathFollower.cs @@ -0,0 +1,98 @@ +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Reflection.Emit; +using System.Text; +using Verse; +using Verse.AI; + +namespace DualWield.Harmony +{ + + + /* + [HarmonyPatch(typeof(Pawn_PathFollower), "PatherTick")] + public class Pawn_PathFollower_PatherTick + { + static IEnumerable Transpiler(IEnumerable instructions) + { + var instructionsList = new List(instructions); + foreach (CodeInstruction instruction in instructionsList) + { + if(instruction.operand as MethodInfo == typeof(Pawn_StanceTracker).GetMethod("get_FullBodyBusy")) + { + yield return new CodeInstruction(OpCodes.Call, typeof(Pawn_PathFollower_PatherTick).GetMethod("FullBodyBusyOrOffHandCooldown")); + } + else + { + yield return instruction; + } + } + } + public static bool FullBodyBusyOrOffHandCooldown(Pawn_StanceTracker instance) + { + bool result = false; + Pawn pawn = instance.pawn; + if (pawn.stances.FullBodyBusy) + { + return true; + } + if (pawn.GetStancesOffHand() is Pawn_StanceTracker stancesOffHand) + { + if (pawn.GetStancesOffHand() is Pawn_StanceTracker offHandStance && offHandStance.curStance is Stance_Cooldown && !RunAndGunEnabled(pawn)) + { + result = stancesOffHand.curStance.StanceBusy; + } + } + return result; + } + + private static bool RunAndGunEnabled(Pawn pawn) + { + bool runAndGunEnabled = false; + if (pawn.AllComps.FirstOrDefault((ThingComp tc) => tc.GetType().Name == "CompRunAndGun") is ThingComp comp) + { + if(comp.CompInspectStringExtra() != "")//Try to get value of isEnabled by abusing compInspectString. Only works with newer versions of RunAndGun. + { + runAndGunEnabled = Convert.ToBoolean(comp.CompInspectStringExtra()); + } + else //Otherwise use reflections, which is much more expensive in terms of execution time. + { + Log.Message("calling traverse :("); + //runAndGunEnabled = Traverse.Create(comp).Field("isEnabled").GetValue(); + } + } + return runAndGunEnabled; + } + } + */ + + /* + [HarmonyPatch(typeof(PawnTweener), "MovedPercent")] + class PawnTweener_MovedPercent + { + static void Postfix(PawnTweener __instance, ref float __result) + { + Pawn pawn = Traverse.Create(__instance).Field("pawn").GetValue(); + if (pawn.GetStancesOffHand() is Pawn_StanceTracker stancesOffHand) + { + if (stancesOffHand.curStance.StanceBusy) + { + bool runAndGunEnabled = false; + if (pawn.AllComps.FirstOrDefault((ThingComp tc) => tc.GetType().Name == "CompRunAndGun") is ThingComp comp) + { + runAndGunEnabled = Traverse.Create(comp).Field("isEnabled").GetValue(); + } + if (!runAndGunEnabled) + { + __result = 0f; + } + } + } + } + } + */ + +} diff --git a/1.4/Source/DualWield/Harmony/Pawn_RotationTracker.cs b/1.4/Source/DualWield/Harmony/Pawn_RotationTracker.cs new file mode 100644 index 0000000..14a2efd --- /dev/null +++ b/1.4/Source/DualWield/Harmony/Pawn_RotationTracker.cs @@ -0,0 +1,29 @@ +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(Pawn_RotationTracker), "UpdateRotation")] + class Pawn_RotationTracker_UpdateRotation + { + static void Postfix(Pawn_RotationTracker __instance, ref Pawn ___pawn) + { + Stance_Busy stance_Busy = ___pawn.GetStancesOffHand().curStance as Stance_Busy; + if (stance_Busy != null && stance_Busy.focusTarg.IsValid && !___pawn.pather.Moving) + { + if (stance_Busy.focusTarg.HasThing) + { + __instance.Face(stance_Busy.focusTarg.Thing.DrawPos); + } + else + { + __instance.FaceCell(stance_Busy.focusTarg.Cell); + } + } + } + } +} diff --git a/1.4/Source/DualWield/Harmony/Pawn_StanceTracker.cs b/1.4/Source/DualWield/Harmony/Pawn_StanceTracker.cs new file mode 100644 index 0000000..d98e340 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/Pawn_StanceTracker.cs @@ -0,0 +1,55 @@ +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Verse; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(Pawn_StanceTracker), "get_FullBodyBusy")] + class Pawn_StanceTracker_FullBodyBusy + { + static void Postfix(Pawn_StanceTracker __instance, ref bool __result) + { + if (__result) + { + return; + } + else + { + __result = FullBodyBusyOrOffHandCooldown(__instance); + } + } + public static bool FullBodyBusyOrOffHandCooldown(Pawn_StanceTracker instance) + { + bool result = false; + Pawn pawn = instance.pawn; + if (pawn.GetStancesOffHand() is Pawn_StanceTracker stancesOffHand) + { + if (pawn.GetStancesOffHand() is Pawn_StanceTracker offHandStance && offHandStance.curStance is Stance_Cooldown && !RunAndGunEnabled(pawn)) + { + result = stancesOffHand.curStance.StanceBusy; + } + } + return result; + } + private static bool RunAndGunEnabled(Pawn pawn) + { + bool runAndGunEnabled = false; + if (pawn.AllComps.FirstOrDefault((ThingComp tc) => tc.GetType().Name == "CompRunAndGun") is ThingComp comp) + { + if (comp.GetDescriptionPart() != "")//Try to get value of isEnabled by abusing compInspectString. Only works with newer versions of RunAndGun. + { + runAndGunEnabled = Convert.ToBoolean(comp.GetDescriptionPart()); + } + else //Otherwise use reflections, which is much more expensive in terms of execution time. + { + runAndGunEnabled = Traverse.Create(comp).Field("isEnabled").GetValue(); + } + } + return runAndGunEnabled; + } + } +} diff --git a/1.4/Source/DualWield/Harmony/Projectile.cs b/1.4/Source/DualWield/Harmony/Projectile.cs new file mode 100644 index 0000000..4c8dd72 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/Projectile.cs @@ -0,0 +1,50 @@ +using DualWield.Storage; +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using Verse; + +namespace DualWield.Harmony +{ + + [HarmonyPatch(typeof(Projectile), "Launch")] + [HarmonyPatch(new Type[] { typeof(Thing), typeof(Vector3), typeof(LocalTargetInfo), typeof(LocalTargetInfo), typeof(ProjectileHitFlags), typeof(bool), typeof(Thing), typeof(ThingDef) })] + static class Projectile_Launch + { + static void Prefix(ref Thing launcher, ref Vector3 origin, Thing equipment) + { + if (!(launcher is Pawn pawn) || !(equipment is ThingWithComps twc)) + { + return; + } + float zOffset = 0.0f; + float xOffset = 0.0f; + if(launcher.Rotation == Rot4.East) + { + zOffset = 0.1f; + } + else if(launcher.Rotation == Rot4.West) + { + zOffset = -0.1f; + } + else if(launcher.Rotation == Rot4.South) + { + xOffset = 0.1f; + } + else + { + xOffset = -0.1f; + } + + ExtendedThingWithCompsData twcData = Base.Instance.GetExtendedDataStorage().GetExtendedDataFor(twc); + if (twcData.isOffHand) + { + origin += new Vector3(xOffset, 0, zOffset); + } + + } + } +} diff --git a/1.4/Source/DualWield/Harmony/RunAndGun.cs b/1.4/Source/DualWield/Harmony/RunAndGun.cs new file mode 100644 index 0000000..dd9b3bc --- /dev/null +++ b/1.4/Source/DualWield/Harmony/RunAndGun.cs @@ -0,0 +1,57 @@ +using DualWield.Stances; +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + /** + * Since a Run and Gun transpiler targets exactly the same line of code we want to target, we add this patch for compatbility. We basically postfix the method used by RunAndGun on the same line. We use "TargetMethod()" to target the to be patched method in RunAndGun without introducing a dependency. + **/ + [HarmonyPatch] + public class RunAndGun + { + static MethodBase TargetMethod() + { + Assembly ass = GetAssemblyByName("RunAndGun"); + if(ass != null) + { + Type predicateClass = GetAssemblyByName("RunAndGun").GetTypes().FirstOrDefault((Type type) => type.Name == "Verb_TryCastNextBurstShot"); + if(predicateClass != null) + { + MethodInfo minfo = predicateClass.GetMethods(AccessTools.all).FirstOrDefault(m => m.Name.Contains("SetStanceRunAndGun")); + if (minfo != null) + { + return minfo; + } + } + } + return typeof(RunAndGun).GetMethod("Stub"); + } + static void Postfix(Pawn_StanceTracker stanceTracker, Stance_Cooldown stance) + { + //Make sure this is called when run and gun patches the same line of code as we do in the harmony Patch Verb_TryCastNextBurstShot. + //SetStanceOffHand(stanceTracker, stance); + Log.Message("patching run and gun"); + Verb_TryCastNextBurstShot.SetStanceOffHand(stanceTracker, stance); + } + + //When Run and Gun or the to be patched method isn't found, patch this stub method so no error is thrown. + public static void Stub(Pawn_StanceTracker stanceTracker, Stance_Cooldown stance) + { + //Do nothing + } + + static Assembly GetAssemblyByName(string name) + { + return AppDomain.CurrentDomain.GetAssemblies(). + SingleOrDefault(assembly => assembly.GetName().Name == name); + } + + + } +} diff --git a/1.4/Source/DualWield/Harmony/ThingOwner.cs b/1.4/Source/DualWield/Harmony/ThingOwner.cs new file mode 100644 index 0000000..34d1d1a --- /dev/null +++ b/1.4/Source/DualWield/Harmony/ThingOwner.cs @@ -0,0 +1,23 @@ +using DualWield.Storage; +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(ThingOwner), "Remove")] + class ThingOwner_Remove + { + static void Postfix(Thing item) + { + ExtendedDataStorage store = Base.Instance.GetExtendedDataStorage(); + if (store != null && item is ThingWithComps eq && store.TryGetExtendedDataFor(eq, out ExtendedThingWithCompsData result)) + { + store.DeleteExtendedDataFor(eq); + } + } + } +} diff --git a/1.4/Source/DualWield/Harmony/Verb.cs b/1.4/Source/DualWield/Harmony/Verb.cs new file mode 100644 index 0000000..cf683ca --- /dev/null +++ b/1.4/Source/DualWield/Harmony/Verb.cs @@ -0,0 +1,70 @@ +using DualWield.Stances; +using DualWield.Storage; +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection.Emit; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(Verb), "TryStartCastOn", new Type[] { typeof(LocalTargetInfo), typeof(LocalTargetInfo), typeof(bool), typeof(bool), typeof(bool), typeof(bool) })] + public class Verb_TryStartCastOn { + static void Postfix(Verb __instance, LocalTargetInfo castTarg, ref bool __result) + { + if(__instance.caster is Pawn casterPawn) + { + //Check if it's an enemy that's attacked, and not a fire or an arguing husband + if ((!casterPawn.InMentalState && !(castTarg.Thing is Fire))) + { + casterPawn.TryStartOffHandAttack(castTarg, ref __result); + } + } + } + } + + [HarmonyPatch(typeof(Verb), "TryCastNextBurstShot")] + public class Verb_TryCastNextBurstShot + { + [HarmonyPriority(Priority.Low)] + static IEnumerable Transpiler(IEnumerable instructions) + { + var instructionsList = new List(instructions); + foreach (CodeInstruction instruction in instructionsList) + { + if(instruction.operand == typeof(Pawn_StanceTracker).GetMethod("SetStance")) + { + yield return new CodeInstruction(OpCodes.Call, typeof(Verb_TryCastNextBurstShot).GetMethod("SetStanceOffHand")); + } + else + { + yield return instruction; + } + } + } + public static void SetStanceOffHand(Pawn_StanceTracker stanceTracker, Stance_Cooldown stance) + { + ThingWithComps offHandEquip = null; + CompEquippable compEquippable = null; + + + if (stance.verb.EquipmentSource != null && Base.Instance.GetExtendedDataStorage().TryGetExtendedDataFor(stance.verb.EquipmentSource, out ExtendedThingWithCompsData twcdata) && twcdata.isOffHand) + { + offHandEquip = stance.verb.EquipmentSource; + compEquippable = offHandEquip.TryGetComp(); + } + //Check if verb is one from a offhand weapon. + if (compEquippable != null && offHandEquip != stanceTracker.pawn.equipment.Primary) //TODO: check this code + { + stanceTracker.pawn.GetStancesOffHand().SetStance(stance); + } + else if (stanceTracker.curStance.GetType().Name != "Stance_RunAndGun_Cooldown") + { + stanceTracker.SetStance(stance); + } + } + } +} diff --git a/1.4/Source/DualWield/Harmony/VerbProperties.cs b/1.4/Source/DualWield/Harmony/VerbProperties.cs new file mode 100644 index 0000000..f22952d --- /dev/null +++ b/1.4/Source/DualWield/Harmony/VerbProperties.cs @@ -0,0 +1,81 @@ +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(VerbProperties), "AdjustedCooldown")] + [HarmonyPatch(new Type[]{typeof(Tool), typeof(Pawn), typeof(Thing)})] + class VerbProperties_AdjustedCooldown + { + static void Postfix(VerbProperties __instance, Thing equipment, Pawn attacker, ref float __result) + { + if (attacker != null && attacker.skills != null && __instance.category != VerbCategory.BeatFire) + { + SkillRecord skillRecord = __instance.IsMeleeAttack ? attacker.skills.GetSkill(SkillDefOf.Melee) : attacker.skills.GetSkill(SkillDefOf.Shooting); + if(skillRecord == null) + { + return; + } + if (equipment != null && equipment is ThingWithComps twc && twc.IsOffHand()) + { + __result = CalcCooldownPenalty(__result, skillRecord, Base.staticCooldownPOffHand/100f); + } + else if (attacker.equipment != null && attacker.equipment.TryGetOffHandEquipment(out ThingWithComps offHandEq)) + { + __result = CalcCooldownPenalty(__result, skillRecord, Base.staticCooldownPMainHand/100f); + } + } + + + } + + private static float CalcCooldownPenalty(float __result, SkillRecord skillRecord, float staticPenalty) + { + //TODO: make mod settings + float perLevelPenalty = Base.dynamicCooldownP/100f; + int levelsShort = 20 - skillRecord.levelInt; + float dynamicPenalty = perLevelPenalty * levelsShort; + __result *= 1.0f + staticPenalty + dynamicPenalty; + return __result; + } + } + [HarmonyPatch(typeof(VerbProperties), "AdjustedAccuracy")] + class VerbProperties_AdjustedAccuracy + { + static void Postfix(VerbProperties __instance, Thing equipment, ref float __result) + { + if (equipment != null && equipment.ParentHolder is Pawn_EquipmentTracker peqt) + { + Pawn pawn = peqt.pawn; + if(pawn.skills == null) + { + return; + } + SkillRecord skillRecord = __instance.IsMeleeAttack ? pawn.skills.GetSkill(SkillDefOf.Melee) : pawn.skills.GetSkill(SkillDefOf.Shooting); + if (equipment is ThingWithComps twc && twc.IsOffHand()) + { + __result = CalcAccuracyPenalty(__result, skillRecord, Base.staticAccPOffHand/100f); + } + else if (pawn.equipment.TryGetOffHandEquipment(out ThingWithComps offHandEq)) + { + __result = CalcAccuracyPenalty(__result, skillRecord, Base.staticAccPMainHand/100f); + } + } + } + + private static float CalcAccuracyPenalty(float __result, SkillRecord skillRecord, float staticPenalty) + { + //TODO: make mod settings + float perLevelPenalty = Base.dynamicAccP/100f; + int levelsShort = 20 - skillRecord.levelInt; + float dynamicPenalty = perLevelPenalty * levelsShort; + __result *= 1.0f - staticPenalty - dynamicPenalty; + return __result; + } + } +} diff --git a/1.4/Source/DualWield/Harmony/VerbTracker.cs b/1.4/Source/DualWield/Harmony/VerbTracker.cs new file mode 100644 index 0000000..b59d3c0 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/VerbTracker.cs @@ -0,0 +1,120 @@ +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Reflection.Emit; +using System.Text; +using UnityEngine; +using Verse; + +namespace DualWield.Harmony +{ + + [HarmonyPatch(typeof(VerbTracker), "CreateVerbTargetCommand")] + public class VerbTracker_CreateVerbTargetCommand + { + static void Postfix(VerbTracker __instance, Thing ownerThing, ref Verb verb, ref Command_VerbTarget __result) { + if (ownerThing is ThingWithComps twc && twc.ParentHolder is Pawn_EquipmentTracker peqt) + { + CompEquippable ce = __instance.directOwner as CompEquippable; + + if (peqt.pawn.equipment.TryGetOffHandEquipment(out ThingWithComps offHandEquip)) + { + if (offHandEquip != twc) + { + __result = CreateDualWieldCommand(ownerThing, offHandEquip, verb); + } + } + } + } + private static Command_VerbTarget CreateVerbTargetCommand(VerbTracker __instance, Thing ownerThing, Verb verb) + { + + Command_VerbTarget command_VerbTarget = new Command_VerbTarget(); + command_VerbTarget.defaultDesc = ownerThing.LabelCap + ": " + ownerThing.def.description.CapitalizeFirst(); + command_VerbTarget.icon = ownerThing.def.uiIcon; + command_VerbTarget.iconAngle = ownerThing.def.uiIconAngle; + command_VerbTarget.iconOffset = ownerThing.def.uiIconOffset; + command_VerbTarget.tutorTag = "VerbTarget"; + command_VerbTarget.verb = verb; + if (verb.caster.Faction != Faction.OfPlayer) + { + command_VerbTarget.Disable("CannotOrderNonControlled".Translate()); + } + else if (verb.CasterIsPawn) + { + if (verb.CasterPawn.WorkTagIsDisabled(WorkTags.Violent)) + { + command_VerbTarget.Disable("IsIncapableOfViolence".Translate(verb.CasterPawn.LabelShort, verb.CasterPawn)); + } + else if (!verb.CasterPawn.drafter.Drafted) + { + command_VerbTarget.Disable("IsNotDrafted".Translate(verb.CasterPawn.LabelShort, verb.CasterPawn)); + } + } + return command_VerbTarget; + } + + + private static Command_VerbTarget CreateDualWieldCommand(Thing ownerThing, Thing offHandThing, Verb verb) + { + Command_DualWield command_VerbTarget = new Command_DualWield(offHandThing); + command_VerbTarget.defaultDesc = ownerThing.LabelCap + ": " + ownerThing.def.description.CapitalizeFirst(); + command_VerbTarget.icon = ownerThing.def.uiIcon; + command_VerbTarget.iconAngle = ownerThing.def.uiIconAngle; + command_VerbTarget.iconOffset = ownerThing.def.uiIconOffset; + command_VerbTarget.tutorTag = "VerbTarget"; + command_VerbTarget.verb = verb; + if (verb.caster.Faction != Faction.OfPlayer) + { + command_VerbTarget.Disable("CannotOrderNonControlled".Translate()); + } + else if (verb.CasterIsPawn) + { + if (verb.CasterPawn.story.DisabledWorkTagsBackstoryAndTraits.HasFlag(WorkTags.Violent)) + { + command_VerbTarget.Disable("IsIncapableOfViolence".Translate(verb.CasterPawn.LabelShort, verb.CasterPawn)); + } + else if (!verb.CasterPawn.drafter.Drafted) + { + command_VerbTarget.Disable("IsNotDrafted".Translate(verb.CasterPawn.LabelShort, verb.CasterPawn)); + } + } + return command_VerbTarget; + } + } + [HarmonyPatch(typeof(VerbTracker), "GetVerbsCommands")] + class VerbTracker_GetVerbsCommands_Postfix + { + static void Postfix(VerbTracker __instance, ref IEnumerable __result) + { + __result = RemoveCommandForOffHand(__result); + } + + private static IEnumerable RemoveCommandForOffHand(IEnumerable __result) + { + foreach (Command command in __result) + { + if (command is Command_VerbTarget cVerbTarget) + { + Verb verb = cVerbTarget.verb; + + if (verb.EquipmentSource is ThingWithComps twc && twc.ParentHolder is Pawn_EquipmentTracker peqt) + { + bool offhandIsPrimary = false; + //Remove offhand gizmo when dual wielding + //Don't remove offhand gizmo when offhand weapon is the only weapon being carried by the pawn + if (peqt.pawn.equipment.TryGetOffHandEquipment(out ThingWithComps offHandEquip) && offHandEquip == twc && offHandEquip != peqt.Primary) + { + continue; + } + } + } + yield return command; + } + } + } + +} diff --git a/1.4/Source/DualWield/Harmony/Verb_MeleeAttack.cs b/1.4/Source/DualWield/Harmony/Verb_MeleeAttack.cs new file mode 100644 index 0000000..d3e6493 --- /dev/null +++ b/1.4/Source/DualWield/Harmony/Verb_MeleeAttack.cs @@ -0,0 +1,45 @@ +using HarmonyLib; +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection.Emit; +using System.Text; +using Verse; + +namespace DualWield.Harmony +{ + [HarmonyPatch(typeof(Verb_MeleeAttack), "TryCastShot")] + class Verb_MeleeAttack_TryCastShot + { + static IEnumerable Transpiler(IEnumerable instructions) + { + var instructionsList = new List(instructions); + foreach (CodeInstruction instruction in instructionsList) + { + if (instruction.operand == typeof(Pawn_StanceTracker).GetMethod("get_FullBodyBusy")) + { + yield return new CodeInstruction(OpCodes.Ldarg_0); + yield return new CodeInstruction(OpCodes.Call, typeof(Verb_MeleeAttack_TryCastShot).GetMethod("CurrentHandBusy")); + } + else + { + yield return instruction; + } + } + } + public static bool CurrentHandBusy(Pawn_StanceTracker instance, Verb verb) + { + Pawn pawn = instance.pawn; + if(verb.EquipmentSource == null || !verb.EquipmentSource.IsOffHand()) + { + return pawn.stances.FullBodyBusy; + } + else if (pawn.GetStancesOffHand() is Pawn_StanceTracker stancesOffHand) + { + return !verb.Available() || stancesOffHand.curStance.StanceBusy; + } + return false; + } + } +} diff --git a/1.4/Source/DualWield/Jobs/JobDriver_EquipOffHand.cs b/1.4/Source/DualWield/Jobs/JobDriver_EquipOffHand.cs new file mode 100644 index 0000000..66c1638 --- /dev/null +++ b/1.4/Source/DualWield/Jobs/JobDriver_EquipOffHand.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; +using Verse.AI; +using Verse.Sound; + +namespace DualWield.Jobs +{ + class JobDriver_EquipOffHand : JobDriver + { + public override bool TryMakePreToilReservations(bool errorOnFailed) + { + Pawn pawn = this.pawn; + LocalTargetInfo targetA = this.job.targetA; + Job job = this.job; + return pawn.Reserve(targetA, job, 1, -1, null, errorOnFailed); + } + public override IEnumerable MakeNewToils() + { + this.FailOnDestroyedOrNull(TargetIndex.A); + this.FailOnBurningImmobile(TargetIndex.A); + yield return Toils_Goto.GotoThing(TargetIndex.A, PathEndMode.ClosestTouch).FailOnDespawnedNullOrForbidden(TargetIndex.A); + yield return new Toil + { + initAction = delegate + { + ThingWithComps thingWithComps = (ThingWithComps)this.job.targetA.Thing; + ThingWithComps thingWithComps2; + if (thingWithComps.def.stackLimit > 1 && thingWithComps.stackCount > 1) + { + thingWithComps2 = (ThingWithComps)thingWithComps.SplitOff(1); + } + else + { + thingWithComps2 = thingWithComps; + thingWithComps2.DeSpawn(DestroyMode.Vanish); + } + this.pawn.equipment.MakeRoomForOffHand(thingWithComps2); + this.pawn.equipment.AddOffHandEquipment(thingWithComps2); + if (thingWithComps.def.soundInteract != null) + { + thingWithComps.def.soundInteract.PlayOneShot(new TargetInfo(this.pawn.Position, this.pawn.Map, false)); + } + }, + defaultCompleteMode = ToilCompleteMode.Instant + }; + } + } +} diff --git a/1.4/Source/DualWield/ModExtension/DefModextension_CustomRotation.cs b/1.4/Source/DualWield/ModExtension/DefModextension_CustomRotation.cs new file mode 100644 index 0000000..9357b69 --- /dev/null +++ b/1.4/Source/DualWield/ModExtension/DefModextension_CustomRotation.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield +{ + public class DefModextension_CustomRotation : DefModExtension + { + public int extraRotation = 0; + } +} diff --git a/1.4/Source/DualWield/ModExtension/DefModextension_DefaultSettings.cs b/1.4/Source/DualWield/ModExtension/DefModextension_DefaultSettings.cs new file mode 100644 index 0000000..5a4c756 --- /dev/null +++ b/1.4/Source/DualWield/ModExtension/DefModextension_DefaultSettings.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield +{ + public class DefModextension_DefaultSettings : DefModExtension + { + public bool dualWield = false; + public bool twoHand = false; + } +} diff --git a/1.4/Source/DualWield/Settings/Dialog_Weapon_Rotation.cs b/1.4/Source/DualWield/Settings/Dialog_Weapon_Rotation.cs new file mode 100644 index 0000000..697bda4 --- /dev/null +++ b/1.4/Source/DualWield/Settings/Dialog_Weapon_Rotation.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using Verse; + +namespace DualWield.Settings +{ + class Dialog_Weapon_Rotation : Dialog_NodeTree + { + public float sliderValue = 0; + public Dialog_Weapon_Rotation(float sliderValue, DiaNode nodeRoot, bool delayInteractivity = false, bool radioMode = false, string title = null) : base(nodeRoot, delayInteractivity, radioMode, title) + { + this.sliderValue = sliderValue; + } + public override void DoWindowContents(Rect inRect) + { + + Rect rect = windowRect.AtZero(); + Rect sliderPortion = new Rect(rect); + int labelWidth = 50; + + sliderPortion.width = sliderPortion.width - labelWidth; + + Rect labelPortion = new Rect(rect); + labelPortion.width = labelWidth; + labelPortion.position = new Vector2(sliderPortion.position.x + sliderPortion.width + 5f, sliderPortion.position.y + 4f); + + sliderPortion = sliderPortion.ContractedBy(2f); + sliderValue = Widgets.HorizontalSlider(sliderPortion, sliderValue, 0, 360, true); + Widgets.Label(labelPortion, sliderValue.ToString("F2")); + + base.DoWindowContents(inRect); + } + } +} diff --git a/1.4/Source/DualWield/Settings/DictRecordHandler.cs b/1.4/Source/DualWield/Settings/DictRecordHandler.cs new file mode 100644 index 0000000..5c05c17 --- /dev/null +++ b/1.4/Source/DualWield/Settings/DictRecordHandler.cs @@ -0,0 +1,78 @@ +using HugsLib.Settings; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Xml; +using System.Xml.Linq; +using System.Xml.Serialization; +using Verse; + +namespace DualWield.Settings +{ + public class DictRecordHandler : SettingHandleConvertible + { + public Dictionary inner = new Dictionary(); + public Dictionary InnerList { get { return inner; } set { inner = value; } } + private XmlSerializer serializer = new XmlSerializer(typeof(Record)); + + public override void FromString(string settingValue) + { + inner = new Dictionary(); + if (!settingValue.Equals(string.Empty)) + { + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.InnerXml = settingValue; + Dictionary dict = new Dictionary(); + String name = xmlDoc.FirstChild.Name; + foreach(XmlNode recordNode in xmlDoc.FirstChild.ChildNodes) + { + StringReader rdr = new StringReader(recordNode.InnerXml); + dict.Add(XmlConvert.DecodeName(recordNode.Name), (Record)serializer.Deserialize(rdr)); + } + inner = dict; + + } + } + + public override string ToString() + { + XmlDocument xmlDoc = new XmlDocument(); + XmlNode root = xmlDoc.AppendChild(xmlDoc.CreateElement("DictRecordHandler")); + foreach (KeyValuePair child in inner) + { + XmlElement childXml = null; + try + { + childXml = xmlDoc.CreateElement(XmlConvert.VerifyName(child.Key)); + } + catch (XmlException e) + { + childXml = xmlDoc.CreateElement(XmlConvert.EncodeName(child.Key)); + //Log.Warning("Couldn't create Dual Wield settings for: " + child.Key + ", because this defname isn't suitable for XML storage"); + } + childXml.InnerXml = SerializeToString(child.Value); + root.AppendChild(childXml); + } + return xmlDoc.OuterXml; + } + // To Clean XML + private string SerializeToString(T value) + { + var emptyNamespaces = new XmlSerializerNamespaces(new[] { XmlQualifiedName.Empty }); + var serializer = new XmlSerializer(value.GetType()); + var settings = new XmlWriterSettings(); + settings.Indent = true; + settings.OmitXmlDeclaration = true; + + using (var stream = new StringWriter()) + using (var writer = XmlWriter.Create(stream, settings)) + { + serializer.Serialize(writer, value, emptyNamespaces); + return stream.ToString(); + } + } + } + +} diff --git a/1.4/Source/DualWield/Settings/GUIDrawUtility.cs b/1.4/Source/DualWield/Settings/GUIDrawUtility.cs new file mode 100644 index 0000000..cd86391 --- /dev/null +++ b/1.4/Source/DualWield/Settings/GUIDrawUtility.cs @@ -0,0 +1,437 @@ +using RimWorld; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using Verse; +using Verse.Sound; +using HugsLib.Settings; +using HarmonyLib; + +namespace DualWield.Settings +{ + public class GUIDrawUtility + { + + private const float ContentPadding = 5f; + + private const float TextMargin = 20f; + private const float BottomMargin = 2f; + private const float buttonHeight = 28f; + private static readonly Color iconBaseColor = new Color(0.5f, 0.5f, 0.5f, 1f); + private static readonly Color iconMouseOverColor = new Color(0.6f, 0.6f, 0.4f, 1f); + private static readonly Color constGrey = new Color(0.8f, 0.8f, 0.8f, 0.5f); + private static readonly Color disabledColor = new Color(0.7f,0.7f,0.7f,0.2f); + private static readonly Color SelectedColor = new Color(0.5f, 1f, 0.5f, 1f); + private static readonly Color notSelectedColor = new Color(0.5f, 0, 0, 0.1f); + + + private static Color background = new Color(0.5f, 0, 0, 0.1f); + private static Color selectedBackground = new Color(0f, 0.5f, 0, 0.1f); + private const float IconSize = 32f; + private const float IconGap = 1f; + private static Texture2D disabledTex = ContentFinder.Get("UI/ExclamationMark", true); + + + private static void DrawBackground(Rect rect, Color background) + { + Color save = GUI.color; + GUI.color = background; + GUI.DrawTexture(rect, TexUI.FastFillTex); + GUI.color = save; + } + private static void DrawLabel(string labelText, Rect textRect, float offset) + { + var labelHeight = Text.CalcHeight(labelText, textRect.width); + labelHeight -= 2f; + var labelRect = new Rect(textRect.x, textRect.yMin - labelHeight + offset, textRect.width, labelHeight); + GUI.DrawTexture(labelRect, TexUI.GrayTextBG); + GUI.color = Color.white; + Text.Anchor = TextAnchor.UpperCenter; + Widgets.Label(labelRect, labelText); + Text.Anchor = TextAnchor.UpperLeft; + GUI.color = Color.white; + } + private static Color GetColor(ThingDef thingDef) + { + if (thingDef.graphicData != null) + { + return thingDef.graphicData.color; + } + return Color.white; + } + + private static bool DrawTileForThingDef(ThingDef thingDef, KeyValuePair kv, Rect contentRect, Vector2 iconOffset, int buttonID, bool disabled, string disabledReason = "") + { + if(thingDef == null) { + return false; + } + var iconRect = new Rect(contentRect.x + iconOffset.x, contentRect.y + iconOffset.y, IconSize, IconSize); + MouseoverSounds.DoRegion(iconRect, SoundDefOf.Mouseover_Command); + Color save = GUI.color; + if (Mouse.IsOver(iconRect)) + { + GUI.color = iconMouseOverColor; + } + else if (disabled) + { + GUI.color = disabledColor; + } + else if (kv.Value.isSelected == true) + { + GUI.color = selectedBackground; + } + else + { + GUI.color = notSelectedColor; + } + GUI.DrawTexture(iconRect, TexUI.FastFillTex); + GUI.color = save; + + TooltipHandler.TipRegion(iconRect, disabled ? disabledReason : thingDef.label); + + Graphic g2 = null; + Color color = GetColor(thingDef); + if (thingDef.graphicData != null && thingDef.graphicData.Graphic != null) + { + Graphic g = thingDef.graphicData.Graphic; + g2 = thingDef.graphicData.Graphic.GetColoredVersion(g.Shader, color, color); + } + Texture resolvedIcon; + if (!thingDef.uiIconPath.NullOrEmpty()) + { + resolvedIcon = thingDef.uiIcon; + } + else if (g2 != null) + { + resolvedIcon = g2.MatSingle.mainTexture; + } + else + { + resolvedIcon = new Texture2D(0,0); + } + GUI.color = color; + GUI.DrawTexture(iconRect, resolvedIcon); + if (disabled) + { + GUI.DrawTexture(iconRect, disabledTex); + } + GUI.color = Color.white; + + if (Widgets.ButtonInvisible(iconRect, true)) + { + Event.current.button = buttonID; + return true; + } + else + return false; + + } + + private static Color GetPixel(Texture2D tex, float x, float y) + { + Color pix; + int x1 = (int)Mathf.Floor(x); + int y1 = (int)Mathf.Floor(y); + + if (x1 > tex.width || x1 < 0 || + y1 > tex.height || y1 < 0) + { + pix = Color.clear; + } + else + { + pix = tex.GetPixel(x1, y1); + } + + return pix; + } + + private static float Rot_x(float angle, float x, float y) + { + float cos = Mathf.Cos(angle / 180.0f * Mathf.PI); + float sin = Mathf.Sin(angle / 180.0f * Mathf.PI); + return (x * cos + y * (-sin)); + } + private static float Rot_y(float angle, float x, float y) + { + float cos = Mathf.Cos(angle / 180.0f * Mathf.PI); + float sin = Mathf.Sin(angle / 180.0f * Mathf.PI); + return (x * sin + y * cos); + } + + public static bool CustomDrawer_Note(Rect rect, SettingHandle setting) + { + Rect textRect = new Rect(rect); + float neededHeight = (Mathf.Floor((float) setting.Value.Count() / 85f) + 1) * 14f; + textRect.x -= textRect.width; + textRect.width *= 2; + textRect.height = neededHeight; + Widgets.TextArea(textRect, setting.Value, true); + setting.CustomDrawerHeight = neededHeight; + return false; + } + + public static bool CustomDrawer_Button(Rect rect, SettingHandle setting, String activateText, String deactivateText, int xOffset = 0, int yOffset = 0) + { + int labelWidth = (int)rect.width - 20; + int horizontalOffset = 0; + int verticalOffset = 0; + bool change = false; + Rect buttonRect = new Rect(rect); + buttonRect.width = labelWidth; + buttonRect.position = new Vector2(buttonRect.position.x + horizontalOffset + xOffset, buttonRect.position.y + verticalOffset + yOffset); + Color activeColor = GUI.color; + bool isSelected = setting.Value; + String text = setting ? deactivateText : activateText; + + if (isSelected) + GUI.color = SelectedColor; + bool clicked = Widgets.ButtonText(buttonRect, text); + if (isSelected) + GUI.color = activeColor; + + if (clicked) + { + setting.Value = !setting.Value; + change = true; + } + return change; + } + + public static bool CustomDrawer_Tabs(Rect rect, SettingHandle setting, String[] defaultValues, bool vertical = false, int xOffset = 0, int yOffset = 0) + { + int labelWidth = (int)rect.width - 20; + + int horizontalOffset = 0; + int verticalOffset = 0; + + bool change = false; + + foreach (String tab in defaultValues) + { + + Rect buttonRect = new Rect(rect); + buttonRect.width = labelWidth; + buttonRect.position = new Vector2(buttonRect.position.x + horizontalOffset + xOffset, buttonRect.position.y + verticalOffset + yOffset); + Color activeColor = GUI.color; + bool isSelected = tab == setting.Value; + if (isSelected) + GUI.color = SelectedColor; + bool clicked = Widgets.ButtonText(buttonRect, tab); + if (isSelected) + GUI.color = activeColor; + + + if (clicked) + { + if (setting.Value != tab) + { + setting.Value = tab; + } + //else + //{ + // setting.Value = "none"; + //} + change = true; + } + + if (vertical) + { + verticalOffset += (int)buttonRect.height; + } + else + { + horizontalOffset += labelWidth; + } + + } + if (vertical) + { + //setting.CustomDrawerHeight = verticalOffset; + } + return change; + } + + + public static bool CustomDrawer_Filter(Rect rect, SettingHandle slider, bool def_isPercentage, float def_min, float def_max, Color background) + { + DrawBackground(rect, background); + int labelWidth = 50; + + Rect sliderPortion = new Rect(rect); + sliderPortion.width = sliderPortion.width - labelWidth; + + Rect labelPortion = new Rect(rect); + labelPortion.width = labelWidth; + labelPortion.position = new Vector2(sliderPortion.position.x + sliderPortion.width + 5f, sliderPortion.position.y + 4f); + + sliderPortion = sliderPortion.ContractedBy(2f); + + if (def_isPercentage) + Widgets.Label(labelPortion, (Mathf.Round(slider.Value * 100f)).ToString("F0") + "%"); + else + Widgets.Label(labelPortion, slider.Value.ToString("F2")); + + float val = Widgets.HorizontalSlider(sliderPortion, slider.Value, def_min, def_max, true); + bool change = false; + + if (slider.Value != val) + change = true; + + slider.Value = val; + return change; + } + + + public static bool CustomDrawer_MatchingThingDefs_active(Rect wholeRect, SettingHandle setting, Dictionary defaults, List allThingDefs, string yesText = "", string noText = "", Dictionary disabledThingDefs = null,string disabledReason = "") + { + //TODO: refactor this mess, remove redundant and quircky things. + if (setting.Value == null) + { + setting.Value = new DictRecordHandler(); + foreach (KeyValuePair kv in defaults) + { + setting.Value.InnerList.Add(kv.Key, kv.Value); + } + //setting.Value = Base.GetDefaultForFactionRestrictions(new Dict2DRecordHandler(), allPawns, allFactionNames); + } + //CustomDrawer_Tabs(new Rect(wholeRect.x, wholeRect.y, (float)wholeRect.width, buttonHeight), filter, allFactionNames.ToArray(), true, (int)-wholeRect.width, 0); + DrawBackground(wholeRect, background); + + + GUI.color = Color.white; + + Rect leftRect = new Rect(wholeRect); + leftRect.width = leftRect.width / 2; + leftRect.height = wholeRect.height - TextMargin + BottomMargin; + leftRect.position = new Vector2(leftRect.position.x, leftRect.position.y); + Rect rightRect = new Rect(wholeRect); + rightRect.width = rightRect.width / 2; + leftRect.height = wholeRect.height - TextMargin + BottomMargin; + rightRect.position = new Vector2(rightRect.position.x + leftRect.width, rightRect.position.y); + + DrawLabel(yesText, leftRect, TextMargin); + DrawLabel(noText, rightRect, TextMargin); + + leftRect.position = new Vector2(leftRect.position.x, leftRect.position.y + TextMargin); + rightRect.position = new Vector2(rightRect.position.x, rightRect.position.y + TextMargin); + int iconsPerRow = (int)(leftRect.width / (IconGap + IconSize)); + + bool change = false; + //bool factionFound = setting.Value.InnerList.TryGetValue(filter.Value, out Dictionary selection); + //FilterSelection(ref selection, allPawns, filter.Value); + int indexLeft = 0; + int indexRight = 0; + foreach (KeyValuePair item in setting.Value.InnerList) + { + Rect rect = item.Value.isSelected ? leftRect : rightRect; + int index = item.Value.isSelected ? indexLeft : indexRight; + //float tileHeight = item.Value.label.Count() > 16 ? 2 * rowHeight : rowHeight; + leftRect.height = IconSize; + rightRect.height = IconSize; + + if (item.Value.isSelected) + { + indexLeft++; + } + else + { + indexRight++; + } + int column = index % iconsPerRow; + int row = index / iconsPerRow; + ThingDef thingDef = allThingDefs.FirstOrDefault((ThingDef td) => td.defName == item.Key); + bool disabled = false; + if(disabledThingDefs != null) + { + disabled = disabledThingDefs.TryGetValue(item.Key, out Record value) && value.isSelected && item.Value.isSelected; + } + + bool interacted = DrawTileForThingDef(thingDef, item, rect, new Vector2(IconSize * column + column * IconGap, IconSize * row + row * IconGap), index, disabled, disabledReason); + if (interacted) + { + change = true; + item.Value.isSelected = !item.Value.isSelected; + } + } + int biggerRows = Math.Max(indexLeft / iconsPerRow, (setting.Value.InnerList.Count - indexLeft) / iconsPerRow) + 1; + setting.CustomDrawerHeight = (biggerRows * IconSize) + (biggerRows * IconGap) + TextMargin; + //setting.CustomDrawerHeight = Math.Max(leftHeight, rightHeight) + TextMargin; + + if (change) + { + //setting.Value.InnerList[filter.Value] = selection; + //setting.Value.InnerList = selection; + } + return change; + } + + public static bool CustomDrawer_MatchingThingDefs_dialog(Rect wholeRect, SettingHandle setting, Dictionary defaults, List allThingDefs, string yesText = "") + { + //TODO: refactor this mess, remove redundant and quircky things. + + float rowHeight = 20f; + if (setting.Value == null) + { + setting.Value = new DictRecordHandler(); + foreach (KeyValuePair kv in defaults) + { + setting.Value.InnerList.Add(kv.Key, kv.Value); + } + //setting.Value = Base.GetDefaultForFactionRestrictions(new Dict2DRecordHandler(), allPawns, allFactionNames); + } + DrawBackground(wholeRect, background); + + + GUI.color = Color.white; + + Rect rect = new Rect(wholeRect); + rect.width = rect.width; + rect.height = wholeRect.height - TextMargin + BottomMargin; + rect.position = new Vector2(rect.position.x, rect.position.y); + + DrawLabel(yesText, rect, TextMargin); + + rect.position = new Vector2(rect.position.x, rect.position.y + TextMargin); + int iconsPerRow = (int)(rect.width / (IconGap + IconSize)); + + bool change = false; + //bool factionFound = setting.Value.InnerList.TryGetValue(filter.Value, out Dictionary selection); + //FilterSelection(ref selection, allPawns, filter.Value); + int index = 0; + foreach (KeyValuePair item in setting.Value.InnerList) + { + + //float tileHeight = item.Value.label.Count() > 16 ? 2 * rowHeight : rowHeight; + rect.height = IconSize; + int column = index % iconsPerRow; + int row = index / iconsPerRow; + ThingDef thingDef = allThingDefs.FirstOrDefault((ThingDef td) => td.defName == item.Key); + bool interacted = DrawTileForThingDef(thingDef, item, rect, new Vector2(IconSize * column + column * IconGap, IconSize * row + row * IconGap), index, false); + if (interacted) + { + change = true; + Func textGetter = ((int x) => "DW_Setting_CustomRotations_SetRotation".Translate(x)); + Dialog_Slider window = new Dialog_Slider(textGetter, 0, 360, delegate (int value) + { + item.Value.extraRotation = value; + item.Value.isSelected = item.Value.extraRotation > 0; + }, item.Value.extraRotation); + Find.WindowStack.Add(window); + } + index++; + } + int rows = index/iconsPerRow + 1; + setting.CustomDrawerHeight = (rows * IconSize) + (rows * IconGap) + TextMargin; + //setting.CustomDrawerHeight = Math.Max(leftHeight, rightHeight) + TextMargin; + return change; + } + + + } +} + + + diff --git a/1.4/Source/DualWield/Settings/Record.cs b/1.4/Source/DualWield/Settings/Record.cs new file mode 100644 index 0000000..08fc14d --- /dev/null +++ b/1.4/Source/DualWield/Settings/Record.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace DualWield.Settings +{ + public class Record + { + public bool isSelected = false; + public String label = ""; + public int extraRotation = 0; + public Record() + { + + } + public Record(bool isSelected, String label) + { + this.isSelected = isSelected; + this.label = label; + } + public override string ToString() + { + return this.isSelected + "," + this.label; + } + } + +} diff --git a/1.4/Source/DualWield/Stances/Stance_Cooldown_DW.cs b/1.4/Source/DualWield/Stances/Stance_Cooldown_DW.cs new file mode 100644 index 0000000..e58ae20 --- /dev/null +++ b/1.4/Source/DualWield/Stances/Stance_Cooldown_DW.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Stances +{ + class Stance_Cooldown_DW : Stance_Cooldown + { + private const float MaxRadius = 0.5f; + public override bool StanceBusy + { + get + { + return true; + } + } + public Stance_Cooldown_DW() + { + } + public Stance_Cooldown_DW(int ticks, LocalTargetInfo focusTarg, Verb verb) : base(ticks, focusTarg, verb) + { + } + + } +} diff --git a/1.4/Source/DualWield/Stances/Stance_Warmup_DW.cs b/1.4/Source/DualWield/Stances/Stance_Warmup_DW.cs new file mode 100644 index 0000000..af5eee7 --- /dev/null +++ b/1.4/Source/DualWield/Stances/Stance_Warmup_DW.cs @@ -0,0 +1,89 @@ +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using Verse; + +namespace DualWield.Stances +{ + class Stance_Warmup_DW : Stance_Warmup + { + public override bool StanceBusy + { + get + { + return true; + } + } + public Stance_Warmup_DW() + { + } + public Stance_Warmup_DW(int ticks, LocalTargetInfo focusTarg, Verb verb) : base(ticks, focusTarg, verb) + { + } + public override void StanceDraw() + { + if (Find.Selector.IsSelected(this.stanceTracker.pawn)) + { + Pawn shooter = this.stanceTracker.pawn; + LocalTargetInfo target = this.focusTarg; + float facing = 0f; + if (target.Cell != shooter.Position) + { + if (target.Thing != null) + { + facing = (target.Thing.DrawPos - shooter.Position.ToVector3Shifted()).AngleFlat(); + } + else + { + facing = (target.Cell - shooter.Position).AngleFlat; + } + } + float zOffSet = 0f; + float xOffset = 0f; + if(shooter.Rotation == Rot4.East) + { + zOffSet = 0.1f; + } + else if(shooter.Rotation == Rot4.West) + { + zOffSet = -0.1f; + } + else if (shooter.Rotation == Rot4.South) + { + xOffset = 0.1f; + } + else + { + xOffset = -0.1f; + } + GenDraw.DrawAimPieRaw(shooter.DrawPos + new Vector3(xOffset, 0.2f, zOffSet), facing, (int)((float)this.ticksLeft * this.pieSizeFactor)); + } + } + public override void StanceTick() + { + base.StanceTick(); + //if (Pawn.pather.MovingNow) + //Using reflection here for Run and Gun Compatibility. + bool runAndGunEnabled = false; + if(Pawn.AllComps.FirstOrDefault((ThingComp tc) => tc.GetType().Name == "CompRunAndGun") is ThingComp comp) + { + runAndGunEnabled = Traverse.Create(comp).Field("isEnabled").GetValue(); + } + if(!runAndGunEnabled && Pawn.pather.MovingNow) + { + this.stanceTracker.pawn.GetStancesOffHand().SetStance(new Stance_Mobile()); + } + } + public override void Expire() + { + this.verb.WarmupComplete(); + if (this.stanceTracker.curStance == this) + { + this.stanceTracker.pawn.GetStancesOffHand().SetStance(new Stance_Mobile()); + } + } + } +} diff --git a/1.4/Source/DualWield/Storage/ExtendedDataStorage.cs b/1.4/Source/DualWield/Storage/ExtendedDataStorage.cs new file mode 100644 index 0000000..593dc0e --- /dev/null +++ b/1.4/Source/DualWield/Storage/ExtendedDataStorage.cs @@ -0,0 +1,93 @@ +using HugsLib.Utils; +using RimWorld.Planet; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Storage +{ + /** + * Storage used to extend existing Rimworld objects with additional data. Caution should be taken when assigning the IDs. + **/ + public class ExtendedDataStorage : WorldComponent, IExposable + { + private Dictionary _store = + new Dictionary(); + + private List _idWorkingList; + private List _extendedPawnDataWorkingList; + internal int lastEmergencySignalTick = 0; + internal int lastEmergencySignalDelay = 0; + internal int lastEmergencySignalCooldown = 0; + + public ExtendedDataStorage(World world) : base(world) + { + } + public override void ExposeData() + { + base.ExposeData(); + Scribe_Collections.Look( + ref _store, "store", + LookMode.Value, LookMode.Deep, + ref _idWorkingList, ref _extendedPawnDataWorkingList); + Scribe_Values.Look(ref lastEmergencySignalTick, "lastEmergencySignalTick"); + Scribe_Values.Look(ref lastEmergencySignalDelay, "lastEmergencySignalDelay"); + Scribe_Values.Look(ref lastEmergencySignalDelay, "lastEmergencySignalCooldown"); + } + + // Return the associate extended data for a given Pawn, creating a new association + // if required. + public ExtendedPawnData GetExtendedDataFor(Pawn pawn) + { + + int id = pawn.thingIDNumber; + if (_store.TryGetValue(id, out IExposable data) && data is ExtendedPawnData) + { + return (ExtendedPawnData) data; + } + + ExtendedPawnData newExtendedData = new ExtendedPawnData(); + + _store[id] = newExtendedData; + return newExtendedData; + } + + public bool TryGetExtendedDataFor(ThingWithComps twc, out ExtendedThingWithCompsData result) + { + + int id = twc.thingIDNumber; + if (_store.TryGetValue(id, out IExposable data) && data is ExtendedThingWithCompsData) + { + result = (ExtendedThingWithCompsData)data; + return true; + } + result = null; + return false; + } + public ExtendedThingWithCompsData GetExtendedDataFor(ThingWithComps twc) + { + + int id = twc.thingIDNumber; + if (_store.TryGetValue(id, out IExposable data) && data is ExtendedThingWithCompsData) + { + return (ExtendedThingWithCompsData)data; + } + + ExtendedThingWithCompsData newExtendedData = new ExtendedThingWithCompsData(); + _store[id] = newExtendedData; + return newExtendedData; + } + + public void DeleteExtendedDataFor(Pawn pawn) + { + _store.Remove(pawn.thingIDNumber); + } + + public void DeleteExtendedDataFor(ThingWithComps twc) + { + _store.Remove(twc.thingIDNumber); + } + } +} diff --git a/1.4/Source/DualWield/Storage/ExtendedPawnData.cs b/1.4/Source/DualWield/Storage/ExtendedPawnData.cs new file mode 100644 index 0000000..744cfc6 --- /dev/null +++ b/1.4/Source/DualWield/Storage/ExtendedPawnData.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Storage +{ + public class ExtendedPawnData : IExposable + { + public Pawn_StanceTracker stancesOffhand = null; + public void ExposeData() + { + if(stancesOffhand != null) + { + object[] ctorArgs = { stancesOffhand.pawn }; + Scribe_Deep.Look(ref stancesOffhand, "stancesOffhand", false, ctorArgs); + } + } + } +} diff --git a/1.4/Source/DualWield/Storage/ExtendedThingWithCompsData.cs b/1.4/Source/DualWield/Storage/ExtendedThingWithCompsData.cs new file mode 100644 index 0000000..38aa292 --- /dev/null +++ b/1.4/Source/DualWield/Storage/ExtendedThingWithCompsData.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Verse; + +namespace DualWield.Storage +{ + public class ExtendedThingWithCompsData : IExposable + { + public bool isOffHand = false; + public void ExposeData() + { + Scribe_Values.Look(ref isOffHand, "isOffHand", false); + } + } +} diff --git a/1.4/Source/DualWield/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/1.4/Source/DualWield/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/1.4/Source/DualWield/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/1.4/Source/DualWield/obj/Debug/DualWield.AssemblyInfo.cs b/1.4/Source/DualWield/obj/Debug/DualWield.AssemblyInfo.cs new file mode 100644 index 0000000..d918c70 --- /dev/null +++ b/1.4/Source/DualWield/obj/Debug/DualWield.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("DualWield")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.3.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.3.0")] +[assembly: System.Reflection.AssemblyProductAttribute("DualWield")] +[assembly: System.Reflection.AssemblyTitleAttribute("DualWield")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.3.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/1.4/Source/DualWield/obj/Debug/DualWield.AssemblyInfoInputs.cache b/1.4/Source/DualWield/obj/Debug/DualWield.AssemblyInfoInputs.cache new file mode 100644 index 0000000..fcf00bd --- /dev/null +++ b/1.4/Source/DualWield/obj/Debug/DualWield.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +bf5987bbcddda875f11319f67b0f3c58d9293092 diff --git a/1.4/Source/DualWield/obj/Debug/DualWield.GeneratedMSBuildEditorConfig.editorconfig b/1.4/Source/DualWield/obj/Debug/DualWield.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..d35485b --- /dev/null +++ b/1.4/Source/DualWield/obj/Debug/DualWield.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,3 @@ +is_global = true +build_property.RootNamespace = DualWield +build_property.ProjectDir = C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.4\Source\DualWield\ diff --git a/1.4/Source/DualWield/obj/Debug/DualWield.assets.cache b/1.4/Source/DualWield/obj/Debug/DualWield.assets.cache new file mode 100644 index 0000000..de59b42 Binary files /dev/null and b/1.4/Source/DualWield/obj/Debug/DualWield.assets.cache differ diff --git a/1.4/Source/DualWield/obj/Debug/DualWield.csproj.AssemblyReference.cache b/1.4/Source/DualWield/obj/Debug/DualWield.csproj.AssemblyReference.cache new file mode 100644 index 0000000..f67a716 Binary files /dev/null and b/1.4/Source/DualWield/obj/Debug/DualWield.csproj.AssemblyReference.cache differ diff --git a/1.4/Source/DualWield/obj/Debug/DualWield.csproj.CopyComplete b/1.4/Source/DualWield/obj/Debug/DualWield.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/1.4/Source/DualWield/obj/Debug/DualWield.csproj.CoreCompileInputs.cache b/1.4/Source/DualWield/obj/Debug/DualWield.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..8795462 --- /dev/null +++ b/1.4/Source/DualWield/obj/Debug/DualWield.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2b850c9ff5ac03af70f83714c43c37c01237520d diff --git a/1.4/Source/DualWield/obj/Debug/DualWield.csproj.FileListAbsolute.txt b/1.4/Source/DualWield/obj/Debug/DualWield.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..bdebf4c --- /dev/null +++ b/1.4/Source/DualWield/obj/Debug/DualWield.csproj.FileListAbsolute.txt @@ -0,0 +1,19 @@ +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.1\Assemblies\DualWield.dll +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.1\Source\DualWield\obj\Debug\DualWield.csprojAssemblyReference.cache +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.1\Source\DualWield\obj\Debug\DualWield.csproj.CoreCompileInputs.cache +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.1\Source\DualWield\obj\Debug\DualWield.dll +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.3\Source\DualWield\obj\Debug\DualWield.csprojAssemblyReference.cache +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.3\Source\DualWield\obj\Debug\DualWield.AssemblyInfoInputs.cache +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.3\Source\DualWield\obj\Debug\DualWield.AssemblyInfo.cs +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.3\Source\DualWield\obj\Debug\DualWield.csproj.CoreCompileInputs.cache +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.3\Source\DualWield\obj\Debug\DualWield.dll +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.3\Assemblies\DualWield.dll +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.3\Source\DualWield\obj\Debug\DualWield.csproj.CopyComplete +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.4\Source\DualWield\obj\Debug\DualWield.csproj.AssemblyReference.cache +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.4\Source\DualWield\obj\Debug\DualWield.GeneratedMSBuildEditorConfig.editorconfig +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.4\Source\DualWield\obj\Debug\DualWield.AssemblyInfoInputs.cache +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.4\Source\DualWield\obj\Debug\DualWield.AssemblyInfo.cs +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.4\Source\DualWield\obj\Debug\DualWield.csproj.CoreCompileInputs.cache +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.4\Source\DualWield\obj\Debug\DualWield.csproj.CopyComplete +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.4\Source\DualWield\obj\Debug\DualWield.dll +C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods\DualWield\1.4\Assemblies\DualWield.dll diff --git a/1.4/Source/DualWield/obj/Debug/DualWield.csprojAssemblyReference.cache b/1.4/Source/DualWield/obj/Debug/DualWield.csprojAssemblyReference.cache new file mode 100644 index 0000000..d2d61f5 Binary files /dev/null and b/1.4/Source/DualWield/obj/Debug/DualWield.csprojAssemblyReference.cache differ diff --git a/1.4/Source/DualWield/obj/Debug/DualWield.dll b/1.4/Source/DualWield/obj/Debug/DualWield.dll new file mode 100644 index 0000000..744d8c6 Binary files /dev/null and b/1.4/Source/DualWield/obj/Debug/DualWield.dll differ diff --git a/1.4/Source/DualWield/obj/DualWield.csproj.nuget.dgspec.json b/1.4/Source/DualWield/obj/DualWield.csproj.nuget.dgspec.json new file mode 100644 index 0000000..96e8f49 --- /dev/null +++ b/1.4/Source/DualWield/obj/DualWield.csproj.nuget.dgspec.json @@ -0,0 +1,69 @@ +{ + "format": 1, + "restore": { + "C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods\\DualWield\\1.4\\Source\\DualWield\\DualWield.csproj": {} + }, + "projects": { + "C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods\\DualWield\\1.4\\Source\\DualWield\\DualWield.csproj": { + "version": "1.3.0", + "restore": { + "projectUniqueName": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods\\DualWield\\1.4\\Source\\DualWield\\DualWield.csproj", + "projectName": "DualWield", + "projectPath": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods\\DualWield\\1.4\\Source\\DualWield\\DualWield.csproj", + "packagesPath": "C:\\Users\\roolo\\.nuget\\packages\\", + "outputPath": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods\\DualWield\\1.4\\Source\\DualWield\\obj\\", + "projectStyle": "PackageReference", + "configFilePaths": [ + "C:\\Users\\roolo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net472" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net472": { + "targetAlias": "net472", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net472": { + "targetAlias": "net472", + "dependencies": { + "Krafs.Rimworld.Ref": { + "target": "Package", + "version": "[1.4.3530, )", + "generatePathProperty": true + }, + "Lib.Harmony": { + "target": "Package", + "version": "[2.2.2, )" + }, + "TaskPubliciser": { + "include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive", + "suppressParent": "All", + "target": "Package", + "version": "[1.0.3, )" + }, + "UnlimitedHugs.Rimworld.HugsLib": { + "include": "Compile, Build, Native, ContentFiles, Analyzers, BuildTransitive", + "target": "Package", + "version": "[10.0.1, )" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.413\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/1.4/Source/DualWield/obj/DualWield.csproj.nuget.g.props b/1.4/Source/DualWield/obj/DualWield.csproj.nuget.g.props new file mode 100644 index 0000000..510bd6e --- /dev/null +++ b/1.4/Source/DualWield/obj/DualWield.csproj.nuget.g.props @@ -0,0 +1,24 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\roolo\.nuget\packages\ + PackageReference + 5.11.2 + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + + + C:\Users\roolo\.nuget\packages\krafs.rimworld.ref\1.4.3530 + + \ No newline at end of file diff --git a/1.4/Source/DualWield/obj/DualWield.csproj.nuget.g.targets b/1.4/Source/DualWield/obj/DualWield.csproj.nuget.g.targets new file mode 100644 index 0000000..53cfaa1 --- /dev/null +++ b/1.4/Source/DualWield/obj/DualWield.csproj.nuget.g.targets @@ -0,0 +1,6 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + \ No newline at end of file diff --git a/1.4/Source/DualWield/obj/project.assets.json b/1.4/Source/DualWield/obj/project.assets.json new file mode 100644 index 0000000..4730319 --- /dev/null +++ b/1.4/Source/DualWield/obj/project.assets.json @@ -0,0 +1,969 @@ +{ + "version": 3, + "targets": { + ".NETFramework,Version=v4.7.2": { + "Krafs.Rimworld.Ref/1.4.3530": { + "type": "package", + "compile": { + "ref/net472/Assembly-CSharp-firstpass.dll": {}, + "ref/net472/Assembly-CSharp.dll": {}, + "ref/net472/ISharpZipLib.dll": {}, + "ref/net472/Mono.Posix.dll": {}, + "ref/net472/Mono.Security.dll": {}, + "ref/net472/NAudio.dll": {}, + "ref/net472/NVorbis.dll": {}, + "ref/net472/System.Configuration.dll": {}, + "ref/net472/System.Core.dll": {}, + "ref/net472/System.Runtime.Serialization.dll": {}, + "ref/net472/System.Security.dll": {}, + "ref/net472/System.ServiceModel.Internals.dll": {}, + "ref/net472/System.Xml.Linq.dll": {}, + "ref/net472/System.Xml.dll": {}, + "ref/net472/System.dll": {}, + "ref/net472/Unity.TextMeshPro.dll": {}, + "ref/net472/UnityEngine.AIModule.dll": {}, + "ref/net472/UnityEngine.ARModule.dll": {}, + "ref/net472/UnityEngine.AccessibilityModule.dll": {}, + "ref/net472/UnityEngine.AndroidJNIModule.dll": {}, + "ref/net472/UnityEngine.AnimationModule.dll": {}, + "ref/net472/UnityEngine.AssetBundleModule.dll": {}, + "ref/net472/UnityEngine.AudioModule.dll": {}, + "ref/net472/UnityEngine.ClothModule.dll": {}, + "ref/net472/UnityEngine.ClusterInputModule.dll": {}, + "ref/net472/UnityEngine.ClusterRendererModule.dll": {}, + "ref/net472/UnityEngine.CoreModule.dll": {}, + "ref/net472/UnityEngine.CrashReportingModule.dll": {}, + "ref/net472/UnityEngine.DSPGraphModule.dll": {}, + "ref/net472/UnityEngine.DirectorModule.dll": {}, + "ref/net472/UnityEngine.GameCenterModule.dll": {}, + "ref/net472/UnityEngine.GridModule.dll": {}, + "ref/net472/UnityEngine.HotReloadModule.dll": {}, + "ref/net472/UnityEngine.IMGUIModule.dll": {}, + "ref/net472/UnityEngine.ImageConversionModule.dll": {}, + "ref/net472/UnityEngine.InputLegacyModule.dll": {}, + "ref/net472/UnityEngine.InputModule.dll": {}, + "ref/net472/UnityEngine.JSONSerializeModule.dll": {}, + "ref/net472/UnityEngine.LocalizationModule.dll": {}, + "ref/net472/UnityEngine.ParticleSystemModule.dll": {}, + "ref/net472/UnityEngine.PerformanceReportingModule.dll": {}, + "ref/net472/UnityEngine.Physics2DModule.dll": {}, + "ref/net472/UnityEngine.PhysicsModule.dll": {}, + "ref/net472/UnityEngine.ProfilerModule.dll": {}, + "ref/net472/UnityEngine.ScreenCaptureModule.dll": {}, + "ref/net472/UnityEngine.SharedInternalsModule.dll": {}, + "ref/net472/UnityEngine.SpriteMaskModule.dll": {}, + "ref/net472/UnityEngine.SpriteShapeModule.dll": {}, + "ref/net472/UnityEngine.StreamingModule.dll": {}, + "ref/net472/UnityEngine.SubstanceModule.dll": {}, + "ref/net472/UnityEngine.SubsystemsModule.dll": {}, + "ref/net472/UnityEngine.TLSModule.dll": {}, + "ref/net472/UnityEngine.TerrainModule.dll": {}, + "ref/net472/UnityEngine.TerrainPhysicsModule.dll": {}, + "ref/net472/UnityEngine.TextCoreModule.dll": {}, + "ref/net472/UnityEngine.TextRenderingModule.dll": {}, + "ref/net472/UnityEngine.TilemapModule.dll": {}, + "ref/net472/UnityEngine.UI.dll": {}, + "ref/net472/UnityEngine.UIElementsModule.dll": {}, + "ref/net472/UnityEngine.UIModule.dll": {}, + "ref/net472/UnityEngine.UNETModule.dll": {}, + "ref/net472/UnityEngine.UmbraModule.dll": {}, + "ref/net472/UnityEngine.UnityAnalyticsModule.dll": {}, + "ref/net472/UnityEngine.UnityConnectModule.dll": {}, + "ref/net472/UnityEngine.UnityTestProtocolModule.dll": {}, + "ref/net472/UnityEngine.UnityWebRequestAssetBundleModule.dll": {}, + "ref/net472/UnityEngine.UnityWebRequestAudioModule.dll": {}, + "ref/net472/UnityEngine.UnityWebRequestModule.dll": {}, + "ref/net472/UnityEngine.UnityWebRequestTextureModule.dll": {}, + "ref/net472/UnityEngine.UnityWebRequestWWWModule.dll": {}, + "ref/net472/UnityEngine.VFXModule.dll": {}, + "ref/net472/UnityEngine.VRModule.dll": {}, + "ref/net472/UnityEngine.VehiclesModule.dll": {}, + "ref/net472/UnityEngine.VideoModule.dll": {}, + "ref/net472/UnityEngine.WindModule.dll": {}, + "ref/net472/UnityEngine.XRModule.dll": {}, + "ref/net472/UnityEngine.dll": {}, + "ref/net472/com.rlabrecque.steamworks.net.dll": {}, + "ref/net472/mscorlib.dll": {} + } + }, + "Lib.Harmony/2.2.2": { + "type": "package", + "compile": { + "lib/net472/0Harmony.dll": {} + }, + "runtime": { + "lib/net472/0Harmony.dll": {} + } + }, + "Microsoft.Build.Framework/15.1.548": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Globalization": "4.0.11", + "System.Runtime": "4.1.0", + "System.Runtime.InteropServices": "4.1.0", + "System.Threading": "4.0.11", + "System.Threading.Thread": "4.0.0" + }, + "compile": { + "lib/net46/_._": {} + }, + "runtime": { + "lib/net46/_._": {} + } + }, + "Microsoft.Build.Utilities.Core/15.1.548": { + "type": "package", + "dependencies": { + "Microsoft.Build.Framework": "[15.1.548]" + }, + "compile": { + "lib/net46/_._": {} + }, + "runtime": { + "lib/net46/_._": {} + } + }, + "System.Collections/4.0.11": { + "type": "package", + "compile": { + "ref/net45/_._": {} + }, + "runtime": { + "lib/net45/_._": {} + } + }, + "System.Diagnostics.Debug/4.0.11": { + "type": "package", + "compile": { + "ref/net45/_._": {} + }, + "runtime": { + "lib/net45/_._": {} + } + }, + "System.Globalization/4.0.11": { + "type": "package", + "compile": { + "ref/net45/_._": {} + }, + "runtime": { + "lib/net45/_._": {} + } + }, + "System.Runtime/4.1.0": { + "type": "package", + "compile": { + "ref/net462/_._": {} + }, + "runtime": { + "lib/net462/_._": {} + } + }, + "System.Runtime.InteropServices/4.1.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/net462/_._": {} + }, + "runtime": { + "lib/net462/_._": {} + } + }, + "System.Threading/4.0.11": { + "type": "package", + "compile": { + "ref/net45/_._": {} + }, + "runtime": { + "lib/net45/_._": {} + } + }, + "System.Threading.Thread/4.0.0": { + "type": "package", + "compile": { + "ref/net46/_._": {} + }, + "runtime": { + "lib/net46/_._": {} + } + }, + "TaskPubliciser/1.0.3": { + "type": "package", + "dependencies": { + "Microsoft.Build.Utilities.Core": "15.1.548" + }, + "frameworkAssemblies": [ + "System.Runtime", + "System.Runtime.InteropServices", + "System.Threading.Thread" + ], + "build": { + "build/TaskPubliciser.props": {} + } + }, + "UnlimitedHugs.Rimworld.HugsLib/10.0.1": { + "type": "package", + "dependencies": { + "Lib.Harmony": "2.2.2" + }, + "compile": { + "lib/net472/HugsLib.dll": {} + }, + "runtime": { + "lib/net472/_._": {} + } + } + } + }, + "libraries": { + "Krafs.Rimworld.Ref/1.4.3530": { + "sha512": "uXrr/UUaofz351nE/6fQlbXbCPok52BHyWa5oxmtsMh79JzNvjsT5Af8sK/pOC/W60uzDv+NekquglH4YebMog==", + "type": "package", + "path": "krafs.rimworld.ref/1.4.3530", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.md", + "README.md", + "icon.png", + "krafs.rimworld.ref.1.4.3530.nupkg.sha512", + "krafs.rimworld.ref.nuspec", + "ref/net472/Assembly-CSharp-firstpass.dll", + "ref/net472/Assembly-CSharp.dll", + "ref/net472/ISharpZipLib.dll", + "ref/net472/Mono.Posix.dll", + "ref/net472/Mono.Security.dll", + "ref/net472/NAudio.dll", + "ref/net472/NVorbis.dll", + "ref/net472/System.Configuration.dll", + "ref/net472/System.Core.dll", + "ref/net472/System.Runtime.Serialization.dll", + "ref/net472/System.Security.dll", + "ref/net472/System.ServiceModel.Internals.dll", + "ref/net472/System.Xml.Linq.dll", + "ref/net472/System.Xml.dll", + "ref/net472/System.dll", + "ref/net472/Unity.TextMeshPro.dll", + "ref/net472/UnityEngine.AIModule.dll", + "ref/net472/UnityEngine.ARModule.dll", + "ref/net472/UnityEngine.AccessibilityModule.dll", + "ref/net472/UnityEngine.AndroidJNIModule.dll", + "ref/net472/UnityEngine.AnimationModule.dll", + "ref/net472/UnityEngine.AssetBundleModule.dll", + "ref/net472/UnityEngine.AudioModule.dll", + "ref/net472/UnityEngine.ClothModule.dll", + "ref/net472/UnityEngine.ClusterInputModule.dll", + "ref/net472/UnityEngine.ClusterRendererModule.dll", + "ref/net472/UnityEngine.CoreModule.dll", + "ref/net472/UnityEngine.CrashReportingModule.dll", + "ref/net472/UnityEngine.DSPGraphModule.dll", + "ref/net472/UnityEngine.DirectorModule.dll", + "ref/net472/UnityEngine.GameCenterModule.dll", + "ref/net472/UnityEngine.GridModule.dll", + "ref/net472/UnityEngine.HotReloadModule.dll", + "ref/net472/UnityEngine.IMGUIModule.dll", + "ref/net472/UnityEngine.ImageConversionModule.dll", + "ref/net472/UnityEngine.InputLegacyModule.dll", + "ref/net472/UnityEngine.InputModule.dll", + "ref/net472/UnityEngine.JSONSerializeModule.dll", + "ref/net472/UnityEngine.LocalizationModule.dll", + "ref/net472/UnityEngine.ParticleSystemModule.dll", + "ref/net472/UnityEngine.PerformanceReportingModule.dll", + "ref/net472/UnityEngine.Physics2DModule.dll", + "ref/net472/UnityEngine.PhysicsModule.dll", + "ref/net472/UnityEngine.ProfilerModule.dll", + "ref/net472/UnityEngine.ScreenCaptureModule.dll", + "ref/net472/UnityEngine.SharedInternalsModule.dll", + "ref/net472/UnityEngine.SpriteMaskModule.dll", + "ref/net472/UnityEngine.SpriteShapeModule.dll", + "ref/net472/UnityEngine.StreamingModule.dll", + "ref/net472/UnityEngine.SubstanceModule.dll", + "ref/net472/UnityEngine.SubsystemsModule.dll", + "ref/net472/UnityEngine.TLSModule.dll", + "ref/net472/UnityEngine.TerrainModule.dll", + "ref/net472/UnityEngine.TerrainPhysicsModule.dll", + "ref/net472/UnityEngine.TextCoreModule.dll", + "ref/net472/UnityEngine.TextRenderingModule.dll", + "ref/net472/UnityEngine.TilemapModule.dll", + "ref/net472/UnityEngine.UI.dll", + "ref/net472/UnityEngine.UIElementsModule.dll", + "ref/net472/UnityEngine.UIModule.dll", + "ref/net472/UnityEngine.UNETModule.dll", + "ref/net472/UnityEngine.UmbraModule.dll", + "ref/net472/UnityEngine.UnityAnalyticsModule.dll", + "ref/net472/UnityEngine.UnityConnectModule.dll", + "ref/net472/UnityEngine.UnityTestProtocolModule.dll", + "ref/net472/UnityEngine.UnityWebRequestAssetBundleModule.dll", + "ref/net472/UnityEngine.UnityWebRequestAudioModule.dll", + "ref/net472/UnityEngine.UnityWebRequestModule.dll", + "ref/net472/UnityEngine.UnityWebRequestTextureModule.dll", + "ref/net472/UnityEngine.UnityWebRequestWWWModule.dll", + "ref/net472/UnityEngine.VFXModule.dll", + "ref/net472/UnityEngine.VRModule.dll", + "ref/net472/UnityEngine.VehiclesModule.dll", + "ref/net472/UnityEngine.VideoModule.dll", + "ref/net472/UnityEngine.WindModule.dll", + "ref/net472/UnityEngine.XRModule.dll", + "ref/net472/UnityEngine.dll", + "ref/net472/com.rlabrecque.steamworks.net.dll", + "ref/net472/mscorlib.dll" + ] + }, + "Lib.Harmony/2.2.2": { + "sha512": "70KvWz+DiUELxafsYL/LHxA/jH3PDWeApLo/VwtnrpTvRWQ/eUdPfS/l5funmhZWOy41QXw6UjVv+6C57Nx77A==", + "type": "package", + "path": "lib.harmony/2.2.2", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "HarmonyLogo.png", + "LICENSE", + "lib.harmony.2.2.2.nupkg.sha512", + "lib.harmony.nuspec", + "lib/net35/0Harmony.dll", + "lib/net35/0Harmony.xml", + "lib/net45/0Harmony.dll", + "lib/net45/0Harmony.xml", + "lib/net472/0Harmony.dll", + "lib/net472/0Harmony.xml", + "lib/net48/0Harmony.dll", + "lib/net48/0Harmony.xml", + "lib/net5.0/0Harmony.dll", + "lib/net5.0/0Harmony.xml", + "lib/net6.0/0Harmony.dll", + "lib/net6.0/0Harmony.xml", + "lib/netcoreapp3.0/0Harmony.dll", + "lib/netcoreapp3.0/0Harmony.xml", + "lib/netcoreapp3.1/0Harmony.dll", + "lib/netcoreapp3.1/0Harmony.xml" + ] + }, + "Microsoft.Build.Framework/15.1.548": { + "sha512": "wO17o9zmhAq1YYXdlwXtSsX/LzHgF1mWmKZ/X2CQE8n1WWQnzcm0gqyAa4qpp89emRZ4N0shHwq+43/9IafloA==", + "type": "package", + "path": "microsoft.build.framework/15.1.548", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net46/Microsoft.Build.Framework.dll", + "lib/net46/Microsoft.Build.Framework.xml", + "lib/netstandard1.3/Microsoft.Build.Framework.dll", + "lib/netstandard1.3/Microsoft.Build.Framework.xml", + "microsoft.build.framework.15.1.548.nupkg.sha512", + "microsoft.build.framework.nuspec" + ] + }, + "Microsoft.Build.Utilities.Core/15.1.548": { + "sha512": "gY0QMmhhG9HCDFK7T6xS+XAw/+vTfdumUwq9Sfk0KvWYnHFqrta6rwOYdcDIjDyZ2bKYVFcYH2c40mufjQZIgw==", + "type": "package", + "path": "microsoft.build.utilities.core/15.1.548", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net46/Microsoft.Build.Utilities.Core.dll", + "lib/net46/Microsoft.Build.Utilities.Core.xml", + "lib/netstandard1.3/Microsoft.Build.Utilities.Core.dll", + "lib/netstandard1.3/Microsoft.Build.Utilities.Core.xml", + "microsoft.build.utilities.core.15.1.548.nupkg.sha512", + "microsoft.build.utilities.core.nuspec" + ] + }, + "System.Collections/4.0.11": { + "sha512": "YUJGz6eFKqS0V//mLt25vFGrrCvOnsXjlvFQs+KimpwNxug9x0Pzy4PlFMU3Q2IzqAa9G2L4LsK3+9vCBK7oTg==", + "type": "package", + "path": "system.collections/4.0.11", + "files": [ + ".nupkg.metadata", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Collections.dll", + "ref/netcore50/System.Collections.xml", + "ref/netcore50/de/System.Collections.xml", + "ref/netcore50/es/System.Collections.xml", + "ref/netcore50/fr/System.Collections.xml", + "ref/netcore50/it/System.Collections.xml", + "ref/netcore50/ja/System.Collections.xml", + "ref/netcore50/ko/System.Collections.xml", + "ref/netcore50/ru/System.Collections.xml", + "ref/netcore50/zh-hans/System.Collections.xml", + "ref/netcore50/zh-hant/System.Collections.xml", + "ref/netstandard1.0/System.Collections.dll", + "ref/netstandard1.0/System.Collections.xml", + "ref/netstandard1.0/de/System.Collections.xml", + "ref/netstandard1.0/es/System.Collections.xml", + "ref/netstandard1.0/fr/System.Collections.xml", + "ref/netstandard1.0/it/System.Collections.xml", + "ref/netstandard1.0/ja/System.Collections.xml", + "ref/netstandard1.0/ko/System.Collections.xml", + "ref/netstandard1.0/ru/System.Collections.xml", + "ref/netstandard1.0/zh-hans/System.Collections.xml", + "ref/netstandard1.0/zh-hant/System.Collections.xml", + "ref/netstandard1.3/System.Collections.dll", + "ref/netstandard1.3/System.Collections.xml", + "ref/netstandard1.3/de/System.Collections.xml", + "ref/netstandard1.3/es/System.Collections.xml", + "ref/netstandard1.3/fr/System.Collections.xml", + "ref/netstandard1.3/it/System.Collections.xml", + "ref/netstandard1.3/ja/System.Collections.xml", + "ref/netstandard1.3/ko/System.Collections.xml", + "ref/netstandard1.3/ru/System.Collections.xml", + "ref/netstandard1.3/zh-hans/System.Collections.xml", + "ref/netstandard1.3/zh-hant/System.Collections.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.collections.4.0.11.nupkg.sha512", + "system.collections.nuspec" + ] + }, + "System.Diagnostics.Debug/4.0.11": { + "sha512": "w5U95fVKHY4G8ASs/K5iK3J5LY+/dLFd4vKejsnI/ZhBsWS9hQakfx3Zr7lRWKg4tAw9r4iktyvsTagWkqYCiw==", + "type": "package", + "path": "system.diagnostics.debug/4.0.11", + "files": [ + ".nupkg.metadata", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Diagnostics.Debug.dll", + "ref/netcore50/System.Diagnostics.Debug.xml", + "ref/netcore50/de/System.Diagnostics.Debug.xml", + "ref/netcore50/es/System.Diagnostics.Debug.xml", + "ref/netcore50/fr/System.Diagnostics.Debug.xml", + "ref/netcore50/it/System.Diagnostics.Debug.xml", + "ref/netcore50/ja/System.Diagnostics.Debug.xml", + "ref/netcore50/ko/System.Diagnostics.Debug.xml", + "ref/netcore50/ru/System.Diagnostics.Debug.xml", + "ref/netcore50/zh-hans/System.Diagnostics.Debug.xml", + "ref/netcore50/zh-hant/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/System.Diagnostics.Debug.dll", + "ref/netstandard1.0/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/de/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/es/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/fr/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/it/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/ja/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/ko/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/ru/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/zh-hans/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/zh-hant/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/System.Diagnostics.Debug.dll", + "ref/netstandard1.3/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/de/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/es/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/fr/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/it/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/ja/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/ko/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/ru/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/zh-hans/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/zh-hant/System.Diagnostics.Debug.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.diagnostics.debug.4.0.11.nupkg.sha512", + "system.diagnostics.debug.nuspec" + ] + }, + "System.Globalization/4.0.11": { + "sha512": "B95h0YLEL2oSnwF/XjqSWKnwKOy/01VWkNlsCeMTFJLLabflpGV26nK164eRs5GiaRSBGpOxQ3pKoSnnyZN5pg==", + "type": "package", + "path": "system.globalization/4.0.11", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Globalization.dll", + "ref/netcore50/System.Globalization.xml", + "ref/netcore50/de/System.Globalization.xml", + "ref/netcore50/es/System.Globalization.xml", + "ref/netcore50/fr/System.Globalization.xml", + "ref/netcore50/it/System.Globalization.xml", + "ref/netcore50/ja/System.Globalization.xml", + "ref/netcore50/ko/System.Globalization.xml", + "ref/netcore50/ru/System.Globalization.xml", + "ref/netcore50/zh-hans/System.Globalization.xml", + "ref/netcore50/zh-hant/System.Globalization.xml", + "ref/netstandard1.0/System.Globalization.dll", + "ref/netstandard1.0/System.Globalization.xml", + "ref/netstandard1.0/de/System.Globalization.xml", + "ref/netstandard1.0/es/System.Globalization.xml", + "ref/netstandard1.0/fr/System.Globalization.xml", + "ref/netstandard1.0/it/System.Globalization.xml", + "ref/netstandard1.0/ja/System.Globalization.xml", + "ref/netstandard1.0/ko/System.Globalization.xml", + "ref/netstandard1.0/ru/System.Globalization.xml", + "ref/netstandard1.0/zh-hans/System.Globalization.xml", + "ref/netstandard1.0/zh-hant/System.Globalization.xml", + "ref/netstandard1.3/System.Globalization.dll", + "ref/netstandard1.3/System.Globalization.xml", + "ref/netstandard1.3/de/System.Globalization.xml", + "ref/netstandard1.3/es/System.Globalization.xml", + "ref/netstandard1.3/fr/System.Globalization.xml", + "ref/netstandard1.3/it/System.Globalization.xml", + "ref/netstandard1.3/ja/System.Globalization.xml", + "ref/netstandard1.3/ko/System.Globalization.xml", + "ref/netstandard1.3/ru/System.Globalization.xml", + "ref/netstandard1.3/zh-hans/System.Globalization.xml", + "ref/netstandard1.3/zh-hant/System.Globalization.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.globalization.4.0.11.nupkg.sha512", + "system.globalization.nuspec" + ] + }, + "System.Runtime/4.1.0": { + "sha512": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", + "type": "package", + "path": "system.runtime/4.1.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.dll", + "lib/portable-net45+win8+wp80+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.dll", + "ref/netcore50/System.Runtime.dll", + "ref/netcore50/System.Runtime.xml", + "ref/netcore50/de/System.Runtime.xml", + "ref/netcore50/es/System.Runtime.xml", + "ref/netcore50/fr/System.Runtime.xml", + "ref/netcore50/it/System.Runtime.xml", + "ref/netcore50/ja/System.Runtime.xml", + "ref/netcore50/ko/System.Runtime.xml", + "ref/netcore50/ru/System.Runtime.xml", + "ref/netcore50/zh-hans/System.Runtime.xml", + "ref/netcore50/zh-hant/System.Runtime.xml", + "ref/netstandard1.0/System.Runtime.dll", + "ref/netstandard1.0/System.Runtime.xml", + "ref/netstandard1.0/de/System.Runtime.xml", + "ref/netstandard1.0/es/System.Runtime.xml", + "ref/netstandard1.0/fr/System.Runtime.xml", + "ref/netstandard1.0/it/System.Runtime.xml", + "ref/netstandard1.0/ja/System.Runtime.xml", + "ref/netstandard1.0/ko/System.Runtime.xml", + "ref/netstandard1.0/ru/System.Runtime.xml", + "ref/netstandard1.0/zh-hans/System.Runtime.xml", + "ref/netstandard1.0/zh-hant/System.Runtime.xml", + "ref/netstandard1.2/System.Runtime.dll", + "ref/netstandard1.2/System.Runtime.xml", + "ref/netstandard1.2/de/System.Runtime.xml", + "ref/netstandard1.2/es/System.Runtime.xml", + "ref/netstandard1.2/fr/System.Runtime.xml", + "ref/netstandard1.2/it/System.Runtime.xml", + "ref/netstandard1.2/ja/System.Runtime.xml", + "ref/netstandard1.2/ko/System.Runtime.xml", + "ref/netstandard1.2/ru/System.Runtime.xml", + "ref/netstandard1.2/zh-hans/System.Runtime.xml", + "ref/netstandard1.2/zh-hant/System.Runtime.xml", + "ref/netstandard1.3/System.Runtime.dll", + "ref/netstandard1.3/System.Runtime.xml", + "ref/netstandard1.3/de/System.Runtime.xml", + "ref/netstandard1.3/es/System.Runtime.xml", + "ref/netstandard1.3/fr/System.Runtime.xml", + "ref/netstandard1.3/it/System.Runtime.xml", + "ref/netstandard1.3/ja/System.Runtime.xml", + "ref/netstandard1.3/ko/System.Runtime.xml", + "ref/netstandard1.3/ru/System.Runtime.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.xml", + "ref/netstandard1.5/System.Runtime.dll", + "ref/netstandard1.5/System.Runtime.xml", + "ref/netstandard1.5/de/System.Runtime.xml", + "ref/netstandard1.5/es/System.Runtime.xml", + "ref/netstandard1.5/fr/System.Runtime.xml", + "ref/netstandard1.5/it/System.Runtime.xml", + "ref/netstandard1.5/ja/System.Runtime.xml", + "ref/netstandard1.5/ko/System.Runtime.xml", + "ref/netstandard1.5/ru/System.Runtime.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.xml", + "ref/portable-net45+win8+wp80+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.runtime.4.1.0.nupkg.sha512", + "system.runtime.nuspec" + ] + }, + "System.Runtime.InteropServices/4.1.0": { + "sha512": "16eu3kjHS633yYdkjwShDHZLRNMKVi/s0bY8ODiqJ2RfMhDMAwxZaUaWVnZ2P71kr/or+X9o/xFWtNqz8ivieQ==", + "type": "package", + "path": "system.runtime.interopservices/4.1.0", + "files": [ + ".nupkg.metadata", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.InteropServices.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.InteropServices.dll", + "ref/netcore50/System.Runtime.InteropServices.dll", + "ref/netcore50/System.Runtime.InteropServices.xml", + "ref/netcore50/de/System.Runtime.InteropServices.xml", + "ref/netcore50/es/System.Runtime.InteropServices.xml", + "ref/netcore50/fr/System.Runtime.InteropServices.xml", + "ref/netcore50/it/System.Runtime.InteropServices.xml", + "ref/netcore50/ja/System.Runtime.InteropServices.xml", + "ref/netcore50/ko/System.Runtime.InteropServices.xml", + "ref/netcore50/ru/System.Runtime.InteropServices.xml", + "ref/netcore50/zh-hans/System.Runtime.InteropServices.xml", + "ref/netcore50/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/System.Runtime.InteropServices.dll", + "ref/netstandard1.1/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/System.Runtime.InteropServices.dll", + "ref/netstandard1.2/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/System.Runtime.InteropServices.dll", + "ref/netstandard1.3/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/System.Runtime.InteropServices.dll", + "ref/netstandard1.5/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.InteropServices.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.runtime.interopservices.4.1.0.nupkg.sha512", + "system.runtime.interopservices.nuspec" + ] + }, + "System.Threading/4.0.11": { + "sha512": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", + "type": "package", + "path": "system.threading/4.0.11", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Threading.dll", + "lib/netstandard1.3/System.Threading.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Threading.dll", + "ref/netcore50/System.Threading.xml", + "ref/netcore50/de/System.Threading.xml", + "ref/netcore50/es/System.Threading.xml", + "ref/netcore50/fr/System.Threading.xml", + "ref/netcore50/it/System.Threading.xml", + "ref/netcore50/ja/System.Threading.xml", + "ref/netcore50/ko/System.Threading.xml", + "ref/netcore50/ru/System.Threading.xml", + "ref/netcore50/zh-hans/System.Threading.xml", + "ref/netcore50/zh-hant/System.Threading.xml", + "ref/netstandard1.0/System.Threading.dll", + "ref/netstandard1.0/System.Threading.xml", + "ref/netstandard1.0/de/System.Threading.xml", + "ref/netstandard1.0/es/System.Threading.xml", + "ref/netstandard1.0/fr/System.Threading.xml", + "ref/netstandard1.0/it/System.Threading.xml", + "ref/netstandard1.0/ja/System.Threading.xml", + "ref/netstandard1.0/ko/System.Threading.xml", + "ref/netstandard1.0/ru/System.Threading.xml", + "ref/netstandard1.0/zh-hans/System.Threading.xml", + "ref/netstandard1.0/zh-hant/System.Threading.xml", + "ref/netstandard1.3/System.Threading.dll", + "ref/netstandard1.3/System.Threading.xml", + "ref/netstandard1.3/de/System.Threading.xml", + "ref/netstandard1.3/es/System.Threading.xml", + "ref/netstandard1.3/fr/System.Threading.xml", + "ref/netstandard1.3/it/System.Threading.xml", + "ref/netstandard1.3/ja/System.Threading.xml", + "ref/netstandard1.3/ko/System.Threading.xml", + "ref/netstandard1.3/ru/System.Threading.xml", + "ref/netstandard1.3/zh-hans/System.Threading.xml", + "ref/netstandard1.3/zh-hant/System.Threading.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Threading.dll", + "system.threading.4.0.11.nupkg.sha512", + "system.threading.nuspec" + ] + }, + "System.Threading.Thread/4.0.0": { + "sha512": "gIdJqDXlOr5W9zeqFErLw3dsOsiShSCYtF9SEHitACycmvNvY8odf9kiKvp6V7aibc8C4HzzNBkWXjyfn7plbQ==", + "type": "package", + "path": "system.threading.thread/4.0.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Threading.Thread.dll", + "lib/netcore50/_._", + "lib/netstandard1.3/System.Threading.Thread.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Threading.Thread.dll", + "ref/netstandard1.3/System.Threading.Thread.dll", + "ref/netstandard1.3/System.Threading.Thread.xml", + "ref/netstandard1.3/de/System.Threading.Thread.xml", + "ref/netstandard1.3/es/System.Threading.Thread.xml", + "ref/netstandard1.3/fr/System.Threading.Thread.xml", + "ref/netstandard1.3/it/System.Threading.Thread.xml", + "ref/netstandard1.3/ja/System.Threading.Thread.xml", + "ref/netstandard1.3/ko/System.Threading.Thread.xml", + "ref/netstandard1.3/ru/System.Threading.Thread.xml", + "ref/netstandard1.3/zh-hans/System.Threading.Thread.xml", + "ref/netstandard1.3/zh-hant/System.Threading.Thread.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.threading.thread.4.0.0.nupkg.sha512", + "system.threading.thread.nuspec" + ] + }, + "TaskPubliciser/1.0.3": { + "sha512": "FabrgazfKWTzKIO6nwNTX75PwpXuN7NX2tbu7P6qAH0m7pcjsCGVAfOiSKk4KVHcfaJIW/vtgzjbGdvIoCV1Rw==", + "type": "package", + "path": "taskpubliciser/1.0.3", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "build/TaskPubliciser.props", + "taskpubliciser.1.0.3.nupkg.sha512", + "taskpubliciser.nuspec", + "tasks/net472/TaskPubliciser.dll" + ] + }, + "UnlimitedHugs.Rimworld.HugsLib/10.0.1": { + "sha512": "LSviprXJV4k2+R1IShhozRgI2joyz8BSx3Mmwddb+iivz4EBgwx7i8bt0krrIyGuVRPcwThrHDEhuo9ErgMlZQ==", + "type": "package", + "path": "unlimitedhugs.rimworld.hugslib/10.0.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "images/icon.png", + "lib/net472/HugsLib.dll", + "lib/net472/HugsLib.xml", + "unlimitedhugs.rimworld.hugslib.10.0.1.nupkg.sha512", + "unlimitedhugs.rimworld.hugslib.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + ".NETFramework,Version=v4.7.2": [ + "Krafs.Rimworld.Ref >= 1.4.3530", + "Lib.Harmony >= 2.2.2", + "TaskPubliciser >= 1.0.3", + "UnlimitedHugs.Rimworld.HugsLib >= 10.0.1" + ] + }, + "packageFolders": { + "C:\\Users\\roolo\\.nuget\\packages\\": {} + }, + "project": { + "version": "1.3.0", + "restore": { + "projectUniqueName": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods\\DualWield\\1.4\\Source\\DualWield\\DualWield.csproj", + "projectName": "DualWield", + "projectPath": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods\\DualWield\\1.4\\Source\\DualWield\\DualWield.csproj", + "packagesPath": "C:\\Users\\roolo\\.nuget\\packages\\", + "outputPath": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods\\DualWield\\1.4\\Source\\DualWield\\obj\\", + "projectStyle": "PackageReference", + "configFilePaths": [ + "C:\\Users\\roolo\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net472" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net472": { + "targetAlias": "net472", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net472": { + "targetAlias": "net472", + "dependencies": { + "Krafs.Rimworld.Ref": { + "target": "Package", + "version": "[1.4.3530, )", + "generatePathProperty": true + }, + "Lib.Harmony": { + "target": "Package", + "version": "[2.2.2, )" + }, + "TaskPubliciser": { + "include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive", + "suppressParent": "All", + "target": "Package", + "version": "[1.0.3, )" + }, + "UnlimitedHugs.Rimworld.HugsLib": { + "include": "Compile, Build, Native, ContentFiles, Analyzers, BuildTransitive", + "target": "Package", + "version": "[10.0.1, )" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.413\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/1.4/Source/DualWield/obj/project.nuget.cache b/1.4/Source/DualWield/obj/project.nuget.cache new file mode 100644 index 0000000..1699875 --- /dev/null +++ b/1.4/Source/DualWield/obj/project.nuget.cache @@ -0,0 +1,22 @@ +{ + "version": 2, + "dgSpecHash": "TfbhFy8BwLhlWT6cZHa1zi5NcpSuP1IKdRRxkbRufCkWOTGAVpWkpUdqyHDzrKk4InoXbPfiRle7QaK9WHr1+Q==", + "success": true, + "projectFilePath": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\RimWorld\\Mods\\DualWield\\1.4\\Source\\DualWield\\DualWield.csproj", + "expectedPackageFiles": [ + "C:\\Users\\roolo\\.nuget\\packages\\krafs.rimworld.ref\\1.4.3530\\krafs.rimworld.ref.1.4.3530.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\lib.harmony\\2.2.2\\lib.harmony.2.2.2.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\microsoft.build.framework\\15.1.548\\microsoft.build.framework.15.1.548.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\microsoft.build.utilities.core\\15.1.548\\microsoft.build.utilities.core.15.1.548.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\system.collections\\4.0.11\\system.collections.4.0.11.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\system.diagnostics.debug\\4.0.11\\system.diagnostics.debug.4.0.11.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\system.globalization\\4.0.11\\system.globalization.4.0.11.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\system.runtime\\4.1.0\\system.runtime.4.1.0.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\system.runtime.interopservices\\4.1.0\\system.runtime.interopservices.4.1.0.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\system.threading\\4.0.11\\system.threading.4.0.11.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\system.threading.thread\\4.0.0\\system.threading.thread.4.0.0.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\taskpubliciser\\1.0.3\\taskpubliciser.1.0.3.nupkg.sha512", + "C:\\Users\\roolo\\.nuget\\packages\\unlimitedhugs.rimworld.hugslib\\10.0.1\\unlimitedhugs.rimworld.hugslib.10.0.1.nupkg.sha512" + ], + "logs": [] +} \ No newline at end of file diff --git a/1.4/Source/DualWield/packages.config b/1.4/Source/DualWield/packages.config new file mode 100644 index 0000000..945a2fb --- /dev/null +++ b/1.4/Source/DualWield/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/.signature.p7s b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/.signature.p7s new file mode 100644 index 0000000..d9e34db Binary files /dev/null and b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/.signature.p7s differ diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/HarmonyLogo.png b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/HarmonyLogo.png new file mode 100644 index 0000000..9966dac Binary files /dev/null and b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/HarmonyLogo.png differ diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/LICENSE b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/LICENSE new file mode 100644 index 0000000..655c71c --- /dev/null +++ b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Andreas Pardeike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/Lib.Harmony.2.0.0.7.nupkg b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/Lib.Harmony.2.0.0.7.nupkg new file mode 100644 index 0000000..576848f Binary files /dev/null and b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/Lib.Harmony.2.0.0.7.nupkg differ diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net35/0Harmony.dll b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net35/0Harmony.dll new file mode 100644 index 0000000..d4ac853 Binary files /dev/null and b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net35/0Harmony.dll differ diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net35/0Harmony.xml b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net35/0Harmony.xml new file mode 100644 index 0000000..a17cc8f --- /dev/null +++ b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net35/0Harmony.xml @@ -0,0 +1,2476 @@ + + + + 0Harmony + + + + A factory to create delegate types + + + Default constructor + + + Creates a delegate type for a method + The method + The new delegate type + + + + A getter delegate type + Type that getter gets field/property value from + Type of the value that getter gets + The instance get getter uses + An delegate + + + + A setter delegate type + Type that setter sets field/property value for + Type of the value that setter sets + The instance the setter uses + The value the setter uses + An delegate + + + + A constructor delegate type + Type that constructor creates + An delegate + + + + A helper class for fast access to getters and setters + + + Creates an instantiation delegate + Type that constructor creates + The new instantiation delegate + + + + Creates an getter delegate for a property + Type that getter reads property from + Type of the property that gets accessed + The property + The new getter delegate + + + + Creates an getter delegate for a field + Type that getter reads field from + Type of the field that gets accessed + The field + The new getter delegate + + + + Creates an getter delegate for a field (with a list of possible field names) + Type that getter reads field/property from + Type of the field/property that gets accessed + A list of possible field names + The new getter delegate + + + + Creates an setter delegate + Type that setter assigns property value to + Type of the property that gets assigned + The property + The new setter delegate + + + + Creates an setter delegate for a field + Type that setter assigns field value to + Type of the field that gets assigned + The field + The new getter delegate + + + + A delegate to invoke a method + The instance + The method parameters + The method result + + + A helper class to invoke method with delegates + + + Creates a fast invocation handler from a method + The method to invoke + Controls if boxed value object is accessed/updated directly + The + + + The directBoxValueAccess option controls how value types passed by reference (e.g. ref int, out my_struct) are handled in the arguments array + passed to the fast invocation handler. + Since the arguments array is an object array, any value types contained within it are actually references to a boxed value object. + Like any other object, there can be other references to such boxed value objects, other than the reference within the arguments array. + For example, + + var val = 5; + var box = (object)val; + var arr = new object[] { box }; + handler(arr); // for a method with parameter signature: ref/out/in int + + + + + If directBoxValueAccess is true, the boxed value object is accessed (and potentially updated) directly when the handler is called, + such that all references to the boxed object reflect the potentially updated value. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, both box and arr[0] + now reflect the value 10. Note that the original val is not updated, since boxing always copies the value into the new boxed value object. + + + If directBoxValueAccess is false (default), the boxed value object in the arguments array is replaced with a "reboxed" value object, + such that potential updates to the value are reflected only in the arguments array. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, only arr[0] now reflects the value 10. + + + + + A low level memory helper + + + Mark method for no inlining (currently only works on Mono) + The method/constructor to change + + + Detours a method + The original method/constructor + The replacement method/constructor + An error string + + + + Writes a jump to memory + The memory address + Jump destination + An error string + + + + Gets the start of a method in memory + The method/constructor + [out] Details of the exception + The method start address + + + + special parameter names that can be used in prefix and postfix methods + + + Patch function helpers + + + Adds a prefix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a prefix + The patch info + The owner (Harmony ID) + + + + Adds a postfix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a postfix + The patch info + The owner (Harmony ID) + + + + Adds a transpiler + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a transpiler + The patch info + The owner (Harmony ID) + + + + Adds a finalizer + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a finalizer + The patch info + The owner (Harmony ID) + + + + Removes a patch method + The patch info + The patch method + + + + Gets sorted patch methods + The original method + Patches to sort + Use debug mode + The sorted patch methods + + + + Creates new replacement method with the latest patches and detours the original method + The original method + Information describing the patches + The newly created replacement method + + + + Creates a patch sorter + Array of patches that will be sorted + Use debugging + + + Sorts internal PatchSortingWrapper collection and caches the results. + After first run the result is provided from the cache. + The original method + The sorted patch methods + + + Checks if the sorter was created with the same patch list and as a result can be reused to + get the sorted order of the patches. + List of patches to check against + true if equal + + + Removes one unresolved dependency from the least important patch. + + + Outputs all unblocked patches from the waiting list to results list + + + Adds patch to both results list and handled patches set + Patch to add + + + Wrapper used over the Patch object to allow faster dependency access and + dependency removal in case of cyclic dependencies + + + Create patch wrapper object used for sorting + Patch to wrap + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + Determines whether patches are equal + The other patch + true if equal + + + Hash function + A hash code + + + Bidirectionally registers Patches as after dependencies + List of dependencies to register + + + Bidirectionally registers Patches as before dependencies + List of dependencies to register + + + Bidirectionally removes Patch from after dependencies + Patch to remove + + + Bidirectionally removes Patch from before dependencies + Patch to remove + + + Specifies the type of method + + + + This is a normal method + + + This is a getter + + + This is a setter + + + This is a constructor + + + This is a static constructor + + + Specifies the type of argument + + + + This is a normal argument + + + This is a reference argument (ref) + + + This is an out argument (out) + + + This is a pointer argument (&) + + + Specifies the type of patch + + + + Any patch + + + A prefix patch + + + A postfix patch + + + A transpiler + + + A finalizer + + + A reverse patch + + + Specifies the type of reverse patch + + + + Use the unmodified original method (directly from IL) + + + Use the original as it is right now including previous patches but excluding future ones + + + The base class for all Harmony annotations (not meant to be used directly) + + + + The common information for all attributes + + + Annotation to define your Harmony patch methods + + + + An empty annotation can be used together with TargetMethod(s) + + + + An annotation that specifies a class to patch + The declaring class/type + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The argument types of the method or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + Annotation to define your standin methods for reverse patching + + + + An annotation that specifies the type of reverse patching + The of the reverse patch + + + + A Harmony annotation to define that all methods in a class are to be patched + + + + A Harmony annotation + + + + A Harmony annotation to define patch priority + The priority + + + + A Harmony annotation + + + + A Harmony annotation to define that a patch comes before another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to define that a patch comes after another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to debug a patch (output uses to log to your Desktop) + + + + Specifies the Prepare function in a patch class + + + + Specifies the Cleanup function in a patch class + + + + Specifies the TargetMethod function in a patch class + + + + Specifies the TargetMethods function in a patch class + + + + Specifies the Prefix function in a patch class + + + + Specifies the Postfix function in a patch class + + + + Specifies the Transpiler function in a patch class + + + + Specifies the Finalizer function in a patch class + + + + A Harmony annotation + + + + The name of the original argument + + + + The index of the original argument + + + + The new name of the original argument + + + + An annotation to declare injected arguments by name + + + + An annotation to declare injected arguments by index + Zero-based index + + + + An annotation to declare injected arguments by renaming them + Name of the original argument + New name + + + + An annotation to declare injected arguments by index and renaming them + Zero-based index + New name + + + + An abstract wrapper around OpCode and their operands. Used by transpilers + + + + The opcode + + + + The operand + + + + All labels defined on this instruction + + + + All exception block boundaries defined on this instruction + + + + Creates a new CodeInstruction with a given opcode and optional operand + The opcode + The operand + + + + Create a full copy (including labels and exception blocks) of a CodeInstruction + The to copy + + + + Clones a CodeInstruction and resets its labels and exception blocks + A lightweight copy of this code instruction + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its opcode + The opcode + A copy of this CodeInstruction with a new opcode + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its operand + The operand + A copy of this CodeInstruction with a new operand + + + + Returns a string representation of the code instruction + A string representation of the code instruction + + + + Exception block types + + + + The beginning of an exception block + + + + The beginning of a catch block + + + + The beginning of an except filter block + + + + The beginning of a fault block + + + + The beginning of a finally block + + + + The end of an exception block + + + + An exception block + + + + Block type + + + + Catch type + + + + Creates an exception block + The + The catch type + + + + The Harmony instance is the main entry to Harmony. After creating one with an unique identifier, it is used to patch and query the current application domain + + + + The unique identifier + + + + Set to true before instantiating Harmony to debug Harmony or use an environment variable to set HARMONY_DEBUG to '1' like this: cmd /C "set HARMONY_DEBUG=1 && game.exe" + This is for full debugging. To debug only specific patches, use the attribute + + + + Creates a new Harmony instance + A unique identifier (you choose your own) + A Harmony instance + + + + Searches the current assembly for Harmony annotations and uses them to create patches + + + + Creates a empty patch processor for an original method + The original method/constructor + A new instance + + + + Creates a patch class processor from an annotated class + The class/type + A new instance + + + + Creates a reverse patcher for one of your stub methods + The original method/constructor + The stand-in stub method as + A new instance + + + + Searches an assembly for Harmony annotations and uses them to create patches + The assembly + + + + Creates patches by manually specifying the methods + The original method/constructor + An optional prefix method wrapped in a object + An optional postfix method wrapped in a object + An optional transpiler method wrapped in a object + An optional finalizer method wrapped in a object + The replacement method that was created to patch the original method + + + + Patches a foreign method onto a stub method of yours and optionally applies transpilers during the process + The original method/constructor you want to duplicate + Your stub method as that will become the original. Needs to have the correct signature (either original or whatever your transpilers generates) + An optional transpiler as method that will be applied during the process + The replacement method that was created to patch the stub method + + + + Unpatches methods + The optional Harmony ID to restrict unpatching to a specific instance + This method could be static if it wasn't for the fact that unpatching creates a new replacement method that contains your harmony ID + + + + Unpatches a method + The original method/constructor + The + The optional Harmony ID to restrict unpatching to a specific instance + + + + Unpatches a method + The original method/constructor + The patch method as method to remove + + + + Test for patches from a specific Harmony ID + The Harmony ID + True if patches for this ID exist + + + + Gets patch information for a given original method + The original method/constructor + The patch information as + + + + Gets the methods this instance has patched + An enumeration of original methods/constructors + + + + Gets all patched original methods in the appdomain + An enumeration of patched original methods/constructors + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly versions keyed by Harmony IDs + + + + Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure + + + + Default serialization constructor (not implemented) + The info + The context + + + + Get a list of IL instructions in pairs of offset+code + A list of key/value pairs which represent an offset and the code at that offset + + + + Get a list of IL instructions without offsets + A list of + + + + Get the error offset of the errornous IL instruction + The offset + + + + Get the index of the errornous IL instruction + The index into the list of instructions or -1 if not found + + + + A wrapper around a method to use it as a patch (for example a Prefix) + + + + The original method + + + + Class/type declaring this patch + + + + Patch method name + + + + Optional patch + + + + Array of argument types of the patch method + + + + of the patch + + + + Install this patch before patches with these Harmony IDs + + + + Install this patch after patches with these Harmony IDs + + + + Reverse patch type, see + + + + Create debug output for this patch + + + + Default constructor + + + + Creates a patch from a given method + The original method + + + + Creates a patch from a given method + The original method + The patch + A list of harmony IDs that should come after this patch + A list of harmony IDs that should come before this patch + Set to true to generate debug output + + + + Creates a patch from a given method + The patch class/type + The patch method name + The optional argument types of the patch method (for overloaded methods) + + + + Gets the names of all internal patch info fields + A list of field names + + + + Merges annotations + The list of to merge + The merged + + + + Returns a string that represents the annotation + A string representation + + + + Annotation extensions + + + + Copies annotation information + The source + The destination + + + + Clones an annotation + The to clone + A copied + + + + Merges annotations + The master + The detail + A new, merged + + + + Gets all annotations on a class/type + The class/type + A list of all + + + + Gets merged annotations on a class/type + The class/type + The merged + + + + Gets all annotations on a method + The method/constructor + A list of + + + + Gets merged annotations on a method + The method/constructor + The merged + + + + + A mutable representation of an inline signature, similar to Mono.Cecil's CallSite. + Used by the calli instruction, can be used by transpilers + + + + + See + + + + See + + + + See + + + + The list of all parameter types or function pointer signatures received by the call site + + + + The return type or function pointer signature returned by the call site + + + + Returns a string representation of the inline signature + A string representation of the inline signature + + + + + A mutable representation of a parameter type with an attached type modifier, + similar to Mono.Cecil's OptionalModifierType / RequiredModifierType and C#'s modopt / modreq + + + + + Whether this is a modopt (optional modifier type) or a modreq (required modifier type) + + + + The modifier type attached to the parameter type + + + + The modified parameter type + + + + Returns a string representation of the modifier type + A string representation of the modifier type + + + + Patch serialization + + + + Control the binding of a serialized object to a type + Specifies the assembly name of the serialized object + Specifies the type name of the serialized object + The type of the object the formatter creates a new instance of + + + + Serializes a patch info + The + The serialized data + + + + Deserialize a patch info + The serialized data + A + + + + Compare function to sort patch priorities + The patch + Zero-based index + The priority + A standard sort integer (-1, 0, 1) + + + + Serializable patch information + + + + Prefixes as an array of + + + + Postfixes as an array of + + + + Transpilers as an array of + + + + Finalizers as an array of + + + + Default constructor + + + + Returns if any of the patches wants debugging turned on + + + + Adds a prefix + + The prefix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for prefixes that should run after this prefix + A list of Harmony IDs for prefixes that should run before this prefix + A flag that will log the replacement method via every time this prefix is used to build the replacement, even in the future + + + + Removes prefixes + The owner of the prefix or * for any prefix + + + + Adds a postfix + The postfix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for postfixes that should run after this postfix + A list of Harmony IDs for postfixes that should run before this postfix + A flag that will log the replacement method via every time this postfix is used to build the replacement, even in the future + + + + Removes postfixes + The owner of the postfix or * for any postfix + + + + Adds a transpiler + The transpiler method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for transpilers that should run after this transpiler + A list of Harmony IDs for transpilers that should run before this transpiler + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes transpilers + The owner of the transpiler or * for any transpiler + + + + Adds a finalizer + The finalizer method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for finalizers that should run after this finalizer + A list of Harmony IDs for finalizers that should run before this finalizer + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes finalizers + The owner of the finalizer or * for any finalizer + + + + Removes a patch using its method + The method of the patch to remove + + + + A serializable patch + + + + Zero-based index + + + + The owner (Harmony ID) + + + + The priority, see + + + + Keep this patch before the patches indicated in the list of Harmony IDs + + + + Keep this patch after the patches indicated in the list of Harmony IDs + + + + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + The method of the static patch method + + + + Creates a patch + The method of the patch + Zero-based index + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for patches that should run after this patch + A list of Harmony IDs for patches that should run before this patch + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Get the patch method or a DynamicMethod if original patch method is a patch factory + The original method/constructor + The method of the patch + + + + Determines whether patches are equal + The other patch + true if equal + + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + + Hash function + A hash code + + + + A PatchClassProcessor used to turn on a class/type into patches + + + + Creates an empty patch class processor + The Harmony instance + The class to process + + + + Applies the patches + A list of all created replacement methods or null if patch class is not annotated + + + + A group of patches + + + + A collection of prefix + + + + A collection of postfix + + + + A collection of transpiler + + + + A collection of finalizer + + + + Gets all owners (Harmony IDs) or all known patches + The patch owners + + + + Creates a group of patches + An array of prefixes as + An array of postfixes as + An array of transpileres as + An array of finalizeres as + + + + A PatchProcessor handles patches on a method/constructor + + + + Creates an empty patch processor + The Harmony instance + The original method/constructor + + + + Adds a prefix + The prefix as a + A for chaining calls + + + + Adds a prefix + The prefix method + A for chaining calls + + + + Adds a postfix + The postfix as a + A for chaining calls + + + + Adds a postfix + The postfix method + A for chaining calls + + + + Adds a transpiler + The transpiler as a + A for chaining calls + + + + Adds a transpiler + The transpiler method + A for chaining calls + + + + Adds a finalizer + The finalizer as a + A for chaining calls + + + + Adds a finalizer + The finalizer method + A for chaining calls + + + + Gets all patched original methods in the appdomain + An enumeration of patched method/constructor + + + + Applies all registered patches + The generated replacement method + + + + Unpatches patches of a given type and/or Harmony ID + The patch type + Harmony ID or * for any + A for chaining calls + + + + Unpatches a specific patch + The method of the patch + A for chaining calls + + + + Gets patch information on an original + The original method/constructor + The patch information as + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly version keyed by Harmony ID + + + + Returns the methods unmodified list of code instructions + The original method/constructor + Optionally an existing generator that will be used to create all local variables and labels contained in the result (if not specified, an internal generator is used) + A list containing all the original + + + + Returns the methods unmodified list of code instructions + The original method/constructor + A new generator that now contains all local variables and labels contained in the result + A list containing all the original + + + + A low level way to read the body of a method. Used for quick searching in methods + The original method + All instructions as opcode/operand pairs + + + + A patch priority + + + + Patch last + + + + Patch with very low priority + + + + Patch with low priority + + + + Patch with lower than normal priority + + + + Patch with normal priority + + + + Patch with higher than normal priority + + + + Patch with high priority + + + + Patch with very high priority + + + + Patch first + + + + A reverse patcher + + + + Creates a reverse patcher + The Harmony instance + The original method/constructor + Your stand-in stub method as + + + + Applies the patch + The type of patch, see + The generated replacement method + + + + A collection of commonly used transpilers + + + + A transpiler that replaces all occurrences of a given method with another one + The enumeration of to act on + Method or constructor to search for + Method or constructor to replace with + Modified enumeration of + + + + A transpiler that alters instructions that match a predicate by calling an action + The enumeration of to act on + A predicate selecting the instructions to change + An action to apply to matching instructions + Modified enumeration of + + + + A transpiler that logs a text at the beginning of the method + The instructions to act on + The log text + Modified enumeration of + + + + A helper class for reflection related functions + + + + Shortcut for to simplify the use of reflections and make it work for any access level + + + + Shortcut for to simplify the use of reflections and make it work for any access level but only within the current type + + + + Gets a type by name. Prefers a full name with namespace but falls back to the first type matching the name otherwise + The name + A type or null if not found + + + + Gets all type by name from a given assembly. This is a wrapper that respects different .NET versions + The assembly + An array of types + + + + Applies a function going up the type hierarchy and stops at the first non null result + Result type of func() + The class/type to start with + The evaluation function returning T + Returns the first non null result or default(T) when reaching the top level type object + + + + Applies a function going into inner types and stops at the first non null result + Generic type parameter + The class/type to start with + The evaluation function returning T + Returns the first non null result or null with no match + + + + Gets the reflection information for a directly declared field + The class/type where the field is defined + The name of the field + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field by searching the type and all its super types + The class/type where the field is defined + The name of the field (case sensitive) + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field + The class/type where the field is declared + The zero-based index of the field inside the class definition + A field or null when type is null or when the field cannot be found + + + + Gets the reflection information for a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a property by searching the type and all its super types + The class/type + The name + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a directly declared method + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The full name like Namespace.Type1.Type2:MethodName of the type where the method is declared + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the names of all method that are declared in a type + The declaring class/type + A list of method names + + + + Gets the names of all method that are declared in the type of the instance + An instance of the type to search in + A list of method names + + + + Gets the names of all fields that are declared in a type + The declaring class/type + A list of field names + + + + Gets the names of all fields that are declared in the type of the instance + An instance of the type to search in + A list of field names + + + + Gets the names of all properties that are declared in a type + The declaring class/type + A list of property names + + + + Gets the names of all properties that are declared in the type of the instance + An instance of the type to search in + A list of property names + + + + Gets the type of any class member of + A member + The class/type of this member + + + + Test if a class member is actually an concrete implementation + A member + True if the member is a declared + + + + Gets the real implementation of a class member + A member + The member itself if its declared. Otherwise the member that is actually implemented in some base type + + + + Gets the reflection information for a directly declared constructor + The class/type where the constructor is declared + Optional parameters to target a specific overload of the constructor + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the constructor cannot be found + + + + Gets the reflection information for a constructor by searching the type and all its super types + The class/type where the constructor is declared + Optional parameters to target a specific overload of the method + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the method cannot be found + + + + Gets reflection information for all declared constructors + The class/type where the constructors are declared + Optional parameters to only consider static constructors + A list of constructor infos + + + + Gets reflection information for all declared methods + The class/type where the methods are declared + A list of methods + + + + Gets reflection information for all declared properties + The class/type where the properties are declared + A list of properties + + + + Gets reflection information for all declared fields + The class/type where the fields are declared + A list of fields + + + + Gets the return type of a method or constructor + The method/constructor + The return type + + + + Given a type, returns the first inner type matching a recursive search by name + The class/type to start searching at + The name of the inner type (case sensitive) + The inner type or null if type/name is null or if a type with that name cannot be found + + + + Given a type, returns the first inner type matching a recursive search with a predicate + The class/type to start searching at + The predicate to search with + The inner type or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first method matching a predicate + The class/type to start searching at + The predicate to search with + The method or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first constructor matching a predicate + The class/type to start searching at + The predicate to search with + The constructor info or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first property matching a predicate + The class/type to start searching at + The predicate to search with + The property or null if type/predicate is null or if a type with that name cannot be found + + + + Returns an array containing the type of each object in the given array + An array of objects + An array of types or an empty array if parameters is null (if an object is null, the type for it will be object) + + + + Creates an array of input parameters for a given method and a given set of potential inputs + The method/constructor you are planing to call + The possible input parameters in any order + An object array matching the method signature + + + + A read/writable reference to an instance field + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The runtime instance to access the field (leave empty for static fields) + An readable/assignable object representing the field + + + + Creates an instance field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + A read and writable field reference delegate + + + + Creates an instance field reference for a specific instance + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The instance + The name of the field + An readable/assignable object representing the field + + + + Creates an instance field reference delegate + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The field of the field + A read and writable delegate + + + + A read/writable reference delegate to a static field + The type of the field + An readable/assignable object representing the static field + + + + Creates a static field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + An readable/assignable object representing the static field + + + + Creates a static field reference delegate + The type of the field + The field + A read and writable delegate + + + + Returns who called the current method + The calling method/constructor (excluding the caller) + + + + Rethrows an exception while preserving its stack trace (throw statement typically clobbers existing stack traces) + The exception to rethrow + + + + Tells you if the current runtime is based on Mono + True if we are running under Mono, false otherwise (.NET) + + + + Throws a missing member runtime exception + The type that is involved + A list of names + + + + Gets default value for a specific type + The class/type + The default value + + + + Creates an (possibly uninitialized) instance of a given type + The class/type + The new instance + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + A copy of the original object but of type T + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + [out] The copy of the original object + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + + + + Makes a deep copy of any object + The original object + The type of the instance that should be created + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + The copy of the original object + + + + Tests if a type is a struct + The type + True if the type is a struct + + + + Tests if a type is a class + The type + True if the type is a class + + + + Tests if a type is a value type + The type + True if the type is a value type + + + + Tests if a type is an integer type + The type + True if the type represents some integer + + + + Tests if a type is a floating point type + The type + True if the type represents some floating point + + + + Tests if a type is a numerical type + The type + True if the type represents some number + + + + Tests if a type is void + The type + True if the type is void + + + + Test whether an instance is of a nullable type + Type of instance + An instance to test + True if instance is of nullable type, false if not + + + + Calculates a combined hash code for an enumeration of objects + The objects + The hash code + + + + General extensions for common cases + + + + Joins an enumeration with a value converter and a delimiter to a string + The inner type of the enumeration + The enumeration + An optional value converter (from T to string) + An optional delimiter + The values joined into a string + + + + Converts an array of types (for example methods arguments) into a human readable form + The array of types + A human readable description including brackets + + + + A full description of a type + The type + A human readable description + + + + A a full description of a method or a constructor without assembly details but with generics + The method/constructor + A human readable description + + + + A helper converting parameter infos to types + The array of parameter infos + An array of types + + + + A helper to access a value via key from a dictionary + The key type + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist + + + + A helper to access a value via key from a dictionary with extra casting + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist or cannot be cast to T + + + + Escapes Unicode and ASCII non printable characters + The string to convert + The string to convert + A string literal surrounded by + + + + Extensions for + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand has the same type and is equal to the value + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand is equal to the value + This is an optimized version of for + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand has the same type and is equal to the given operand + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand is equal to the given operand + This is an optimized version of for + + + + Tests for any form of Ldarg* + The + The (optional) index + True if it matches one of the variations + + + + Tests for Ldarga/Ldarga_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for Starg/Starg_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for any form of Ldloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests for any form of Stloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests if the code instruction branches + The + The label if the instruction is a branch operation or if not + True if the instruction branches + + + + Tests if the code instruction calls the method/constructor + The + The method + True if the instruction calls the method or constructor + + + + Tests if the code instruction loads a constant + The + True if the instruction loads a constant + + + + Tests if the code instruction loads an integer constant + The + The integer constant + True if the instruction loads the constant + + + + Tests if the code instruction loads a floating point constant + The + The floating point constant + True if the instruction loads the constant + + + + Tests if the code instruction loads an enum constant + The + The enum + True if the instruction loads the constant + + + + Tests if the code instruction loads a field + The + The field + Set to true if the address of the field is loaded + True if the instruction loads the field + + + + Tests if the code instruction stores a field + The + The field + True if the instruction stores this field + + + + General extensions for collections + + + + A simple way to execute code for every element in a collection + The inner type of the collection + The collection + The action to execute + + + + A simple way to execute code for elements in a collection matching a condition + The inner type of the collection + The collection + The predicate + The action to execute + + + + A helper to add an item to a collection + The inner type of the collection + The collection + The item to add + The collection containing the item + + + + A helper to add an item to an array + The inner type of the collection + The array + The item to add + The array containing the item + + + + A helper to add items to an array + The inner type of the collection + The array + The items to add + The array containing the items + + + + A file log for debugging + + + + Full pathname of the log file, defaults to a file called harmony.log.txt on your Desktop + + + + The indent character. The default is tab + + + + The current indent level + + + + Changes the indentation level + The value to add to the indentation level + + + + Log a string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + The string to log + + + + Logs a list of string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + A list of strings to log (they will not be re-indented) + + + + Returns the log buffer and optionally empties it + True to empty the buffer + The buffer. + + + + Replaces the buffer with new lines + The lines to store + + + + Flushes the log buffer to disk (use in combination with LogBuffered) + + + + Log a string directly to disk. Slower method that prevents missing information in case of a crash + The string to log. + + + + Resets and deletes the log + + + + Logs some bytes as hex values + The pointer to some memory + The length of bytes to log + + + + A helper class to retrieve reflection info for non-private methods + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The generic result type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + A reflection helper to read and write private elements + The result type defined by GetValue() + + + + Creates a traverse instance from an existing instance + The existing instance + + + + Gets/Sets the current value + The value to read or write + + + + A reflection helper to read and write private elements + + + + Creates a new traverse instance from a class/type + The class/type + A instance + + + + Creates a new traverse instance from a class T + The class + A instance + + + + Creates a new traverse instance from an instance + The object + A instance + + + + Creates a new traverse instance from a named type + The type name, for format see + A instance + + + + Creates a new and empty traverse instance + + + + Creates a new traverse instance from a class/type + The class/type + + + + Creates a new traverse instance from an instance + The object + + + + Gets the current value + The value + + + + Gets the current value + The type of the value + The value + + + + Invokes the current method with arguments and returns the result + The method arguments + The value returned by the method + + + + Invokes the current method with arguments and returns the result + The type of the value + The method arguments + The value returned by the method + + + + Sets a value of the current field or property + The value + The same traverse instance + + + + Gets the type of the current field or property + The type + + + + Moves the current traverse instance to a inner type + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type of the field + The type name + A traverse instance + + + + Gets all fields of the current type + A list of field names + + + + Moves the current traverse instance to a property + The type name + Optional property index + A traverse instance + + + + Moves the current traverse instance to a field + The type of the property + The type name + Optional property index + A traverse instance + + + + Gets all properties of the current type + A list of property names + + + + Moves the current traverse instance to a method + The name of the method + The arguments defining the argument types of the method overload + A traverse instance + + + + Moves the current traverse instance to a method + The name of the method + The argument types of the method + The arguments for the method + A traverse instance + + + + Gets all methods of the current type + A list of method names + + + + Checks if the current traverse instance is for a field + True if its a field + + + + Checks if the current traverse instance is for a property + True if its a property + + + + Checks if the current traverse instance is for a method + True if its a method + + + + Checks if the current traverse instance is for a type + True if its a type + + + + Iterates over all fields of the current type and executes a traverse action + Original object + The action receiving a instance for each field + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each field pair + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the field pair and the instances + + + + Iterates over all properties of the current type and executes a traverse action + Original object + The action receiving a instance for each property + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each property pair + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the property pair and the instances + + + + A default field action that copies fields to fields + + + + Returns a string that represents the current traverse + A string representation + + + + diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net45/0Harmony.dll b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net45/0Harmony.dll new file mode 100644 index 0000000..2b06f36 Binary files /dev/null and b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net45/0Harmony.dll differ diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net45/0Harmony.xml b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net45/0Harmony.xml new file mode 100644 index 0000000..a17cc8f --- /dev/null +++ b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net45/0Harmony.xml @@ -0,0 +1,2476 @@ + + + + 0Harmony + + + + A factory to create delegate types + + + Default constructor + + + Creates a delegate type for a method + The method + The new delegate type + + + + A getter delegate type + Type that getter gets field/property value from + Type of the value that getter gets + The instance get getter uses + An delegate + + + + A setter delegate type + Type that setter sets field/property value for + Type of the value that setter sets + The instance the setter uses + The value the setter uses + An delegate + + + + A constructor delegate type + Type that constructor creates + An delegate + + + + A helper class for fast access to getters and setters + + + Creates an instantiation delegate + Type that constructor creates + The new instantiation delegate + + + + Creates an getter delegate for a property + Type that getter reads property from + Type of the property that gets accessed + The property + The new getter delegate + + + + Creates an getter delegate for a field + Type that getter reads field from + Type of the field that gets accessed + The field + The new getter delegate + + + + Creates an getter delegate for a field (with a list of possible field names) + Type that getter reads field/property from + Type of the field/property that gets accessed + A list of possible field names + The new getter delegate + + + + Creates an setter delegate + Type that setter assigns property value to + Type of the property that gets assigned + The property + The new setter delegate + + + + Creates an setter delegate for a field + Type that setter assigns field value to + Type of the field that gets assigned + The field + The new getter delegate + + + + A delegate to invoke a method + The instance + The method parameters + The method result + + + A helper class to invoke method with delegates + + + Creates a fast invocation handler from a method + The method to invoke + Controls if boxed value object is accessed/updated directly + The + + + The directBoxValueAccess option controls how value types passed by reference (e.g. ref int, out my_struct) are handled in the arguments array + passed to the fast invocation handler. + Since the arguments array is an object array, any value types contained within it are actually references to a boxed value object. + Like any other object, there can be other references to such boxed value objects, other than the reference within the arguments array. + For example, + + var val = 5; + var box = (object)val; + var arr = new object[] { box }; + handler(arr); // for a method with parameter signature: ref/out/in int + + + + + If directBoxValueAccess is true, the boxed value object is accessed (and potentially updated) directly when the handler is called, + such that all references to the boxed object reflect the potentially updated value. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, both box and arr[0] + now reflect the value 10. Note that the original val is not updated, since boxing always copies the value into the new boxed value object. + + + If directBoxValueAccess is false (default), the boxed value object in the arguments array is replaced with a "reboxed" value object, + such that potential updates to the value are reflected only in the arguments array. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, only arr[0] now reflects the value 10. + + + + + A low level memory helper + + + Mark method for no inlining (currently only works on Mono) + The method/constructor to change + + + Detours a method + The original method/constructor + The replacement method/constructor + An error string + + + + Writes a jump to memory + The memory address + Jump destination + An error string + + + + Gets the start of a method in memory + The method/constructor + [out] Details of the exception + The method start address + + + + special parameter names that can be used in prefix and postfix methods + + + Patch function helpers + + + Adds a prefix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a prefix + The patch info + The owner (Harmony ID) + + + + Adds a postfix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a postfix + The patch info + The owner (Harmony ID) + + + + Adds a transpiler + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a transpiler + The patch info + The owner (Harmony ID) + + + + Adds a finalizer + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a finalizer + The patch info + The owner (Harmony ID) + + + + Removes a patch method + The patch info + The patch method + + + + Gets sorted patch methods + The original method + Patches to sort + Use debug mode + The sorted patch methods + + + + Creates new replacement method with the latest patches and detours the original method + The original method + Information describing the patches + The newly created replacement method + + + + Creates a patch sorter + Array of patches that will be sorted + Use debugging + + + Sorts internal PatchSortingWrapper collection and caches the results. + After first run the result is provided from the cache. + The original method + The sorted patch methods + + + Checks if the sorter was created with the same patch list and as a result can be reused to + get the sorted order of the patches. + List of patches to check against + true if equal + + + Removes one unresolved dependency from the least important patch. + + + Outputs all unblocked patches from the waiting list to results list + + + Adds patch to both results list and handled patches set + Patch to add + + + Wrapper used over the Patch object to allow faster dependency access and + dependency removal in case of cyclic dependencies + + + Create patch wrapper object used for sorting + Patch to wrap + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + Determines whether patches are equal + The other patch + true if equal + + + Hash function + A hash code + + + Bidirectionally registers Patches as after dependencies + List of dependencies to register + + + Bidirectionally registers Patches as before dependencies + List of dependencies to register + + + Bidirectionally removes Patch from after dependencies + Patch to remove + + + Bidirectionally removes Patch from before dependencies + Patch to remove + + + Specifies the type of method + + + + This is a normal method + + + This is a getter + + + This is a setter + + + This is a constructor + + + This is a static constructor + + + Specifies the type of argument + + + + This is a normal argument + + + This is a reference argument (ref) + + + This is an out argument (out) + + + This is a pointer argument (&) + + + Specifies the type of patch + + + + Any patch + + + A prefix patch + + + A postfix patch + + + A transpiler + + + A finalizer + + + A reverse patch + + + Specifies the type of reverse patch + + + + Use the unmodified original method (directly from IL) + + + Use the original as it is right now including previous patches but excluding future ones + + + The base class for all Harmony annotations (not meant to be used directly) + + + + The common information for all attributes + + + Annotation to define your Harmony patch methods + + + + An empty annotation can be used together with TargetMethod(s) + + + + An annotation that specifies a class to patch + The declaring class/type + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The argument types of the method or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + Annotation to define your standin methods for reverse patching + + + + An annotation that specifies the type of reverse patching + The of the reverse patch + + + + A Harmony annotation to define that all methods in a class are to be patched + + + + A Harmony annotation + + + + A Harmony annotation to define patch priority + The priority + + + + A Harmony annotation + + + + A Harmony annotation to define that a patch comes before another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to define that a patch comes after another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to debug a patch (output uses to log to your Desktop) + + + + Specifies the Prepare function in a patch class + + + + Specifies the Cleanup function in a patch class + + + + Specifies the TargetMethod function in a patch class + + + + Specifies the TargetMethods function in a patch class + + + + Specifies the Prefix function in a patch class + + + + Specifies the Postfix function in a patch class + + + + Specifies the Transpiler function in a patch class + + + + Specifies the Finalizer function in a patch class + + + + A Harmony annotation + + + + The name of the original argument + + + + The index of the original argument + + + + The new name of the original argument + + + + An annotation to declare injected arguments by name + + + + An annotation to declare injected arguments by index + Zero-based index + + + + An annotation to declare injected arguments by renaming them + Name of the original argument + New name + + + + An annotation to declare injected arguments by index and renaming them + Zero-based index + New name + + + + An abstract wrapper around OpCode and their operands. Used by transpilers + + + + The opcode + + + + The operand + + + + All labels defined on this instruction + + + + All exception block boundaries defined on this instruction + + + + Creates a new CodeInstruction with a given opcode and optional operand + The opcode + The operand + + + + Create a full copy (including labels and exception blocks) of a CodeInstruction + The to copy + + + + Clones a CodeInstruction and resets its labels and exception blocks + A lightweight copy of this code instruction + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its opcode + The opcode + A copy of this CodeInstruction with a new opcode + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its operand + The operand + A copy of this CodeInstruction with a new operand + + + + Returns a string representation of the code instruction + A string representation of the code instruction + + + + Exception block types + + + + The beginning of an exception block + + + + The beginning of a catch block + + + + The beginning of an except filter block + + + + The beginning of a fault block + + + + The beginning of a finally block + + + + The end of an exception block + + + + An exception block + + + + Block type + + + + Catch type + + + + Creates an exception block + The + The catch type + + + + The Harmony instance is the main entry to Harmony. After creating one with an unique identifier, it is used to patch and query the current application domain + + + + The unique identifier + + + + Set to true before instantiating Harmony to debug Harmony or use an environment variable to set HARMONY_DEBUG to '1' like this: cmd /C "set HARMONY_DEBUG=1 && game.exe" + This is for full debugging. To debug only specific patches, use the attribute + + + + Creates a new Harmony instance + A unique identifier (you choose your own) + A Harmony instance + + + + Searches the current assembly for Harmony annotations and uses them to create patches + + + + Creates a empty patch processor for an original method + The original method/constructor + A new instance + + + + Creates a patch class processor from an annotated class + The class/type + A new instance + + + + Creates a reverse patcher for one of your stub methods + The original method/constructor + The stand-in stub method as + A new instance + + + + Searches an assembly for Harmony annotations and uses them to create patches + The assembly + + + + Creates patches by manually specifying the methods + The original method/constructor + An optional prefix method wrapped in a object + An optional postfix method wrapped in a object + An optional transpiler method wrapped in a object + An optional finalizer method wrapped in a object + The replacement method that was created to patch the original method + + + + Patches a foreign method onto a stub method of yours and optionally applies transpilers during the process + The original method/constructor you want to duplicate + Your stub method as that will become the original. Needs to have the correct signature (either original or whatever your transpilers generates) + An optional transpiler as method that will be applied during the process + The replacement method that was created to patch the stub method + + + + Unpatches methods + The optional Harmony ID to restrict unpatching to a specific instance + This method could be static if it wasn't for the fact that unpatching creates a new replacement method that contains your harmony ID + + + + Unpatches a method + The original method/constructor + The + The optional Harmony ID to restrict unpatching to a specific instance + + + + Unpatches a method + The original method/constructor + The patch method as method to remove + + + + Test for patches from a specific Harmony ID + The Harmony ID + True if patches for this ID exist + + + + Gets patch information for a given original method + The original method/constructor + The patch information as + + + + Gets the methods this instance has patched + An enumeration of original methods/constructors + + + + Gets all patched original methods in the appdomain + An enumeration of patched original methods/constructors + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly versions keyed by Harmony IDs + + + + Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure + + + + Default serialization constructor (not implemented) + The info + The context + + + + Get a list of IL instructions in pairs of offset+code + A list of key/value pairs which represent an offset and the code at that offset + + + + Get a list of IL instructions without offsets + A list of + + + + Get the error offset of the errornous IL instruction + The offset + + + + Get the index of the errornous IL instruction + The index into the list of instructions or -1 if not found + + + + A wrapper around a method to use it as a patch (for example a Prefix) + + + + The original method + + + + Class/type declaring this patch + + + + Patch method name + + + + Optional patch + + + + Array of argument types of the patch method + + + + of the patch + + + + Install this patch before patches with these Harmony IDs + + + + Install this patch after patches with these Harmony IDs + + + + Reverse patch type, see + + + + Create debug output for this patch + + + + Default constructor + + + + Creates a patch from a given method + The original method + + + + Creates a patch from a given method + The original method + The patch + A list of harmony IDs that should come after this patch + A list of harmony IDs that should come before this patch + Set to true to generate debug output + + + + Creates a patch from a given method + The patch class/type + The patch method name + The optional argument types of the patch method (for overloaded methods) + + + + Gets the names of all internal patch info fields + A list of field names + + + + Merges annotations + The list of to merge + The merged + + + + Returns a string that represents the annotation + A string representation + + + + Annotation extensions + + + + Copies annotation information + The source + The destination + + + + Clones an annotation + The to clone + A copied + + + + Merges annotations + The master + The detail + A new, merged + + + + Gets all annotations on a class/type + The class/type + A list of all + + + + Gets merged annotations on a class/type + The class/type + The merged + + + + Gets all annotations on a method + The method/constructor + A list of + + + + Gets merged annotations on a method + The method/constructor + The merged + + + + + A mutable representation of an inline signature, similar to Mono.Cecil's CallSite. + Used by the calli instruction, can be used by transpilers + + + + + See + + + + See + + + + See + + + + The list of all parameter types or function pointer signatures received by the call site + + + + The return type or function pointer signature returned by the call site + + + + Returns a string representation of the inline signature + A string representation of the inline signature + + + + + A mutable representation of a parameter type with an attached type modifier, + similar to Mono.Cecil's OptionalModifierType / RequiredModifierType and C#'s modopt / modreq + + + + + Whether this is a modopt (optional modifier type) or a modreq (required modifier type) + + + + The modifier type attached to the parameter type + + + + The modified parameter type + + + + Returns a string representation of the modifier type + A string representation of the modifier type + + + + Patch serialization + + + + Control the binding of a serialized object to a type + Specifies the assembly name of the serialized object + Specifies the type name of the serialized object + The type of the object the formatter creates a new instance of + + + + Serializes a patch info + The + The serialized data + + + + Deserialize a patch info + The serialized data + A + + + + Compare function to sort patch priorities + The patch + Zero-based index + The priority + A standard sort integer (-1, 0, 1) + + + + Serializable patch information + + + + Prefixes as an array of + + + + Postfixes as an array of + + + + Transpilers as an array of + + + + Finalizers as an array of + + + + Default constructor + + + + Returns if any of the patches wants debugging turned on + + + + Adds a prefix + + The prefix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for prefixes that should run after this prefix + A list of Harmony IDs for prefixes that should run before this prefix + A flag that will log the replacement method via every time this prefix is used to build the replacement, even in the future + + + + Removes prefixes + The owner of the prefix or * for any prefix + + + + Adds a postfix + The postfix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for postfixes that should run after this postfix + A list of Harmony IDs for postfixes that should run before this postfix + A flag that will log the replacement method via every time this postfix is used to build the replacement, even in the future + + + + Removes postfixes + The owner of the postfix or * for any postfix + + + + Adds a transpiler + The transpiler method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for transpilers that should run after this transpiler + A list of Harmony IDs for transpilers that should run before this transpiler + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes transpilers + The owner of the transpiler or * for any transpiler + + + + Adds a finalizer + The finalizer method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for finalizers that should run after this finalizer + A list of Harmony IDs for finalizers that should run before this finalizer + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes finalizers + The owner of the finalizer or * for any finalizer + + + + Removes a patch using its method + The method of the patch to remove + + + + A serializable patch + + + + Zero-based index + + + + The owner (Harmony ID) + + + + The priority, see + + + + Keep this patch before the patches indicated in the list of Harmony IDs + + + + Keep this patch after the patches indicated in the list of Harmony IDs + + + + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + The method of the static patch method + + + + Creates a patch + The method of the patch + Zero-based index + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for patches that should run after this patch + A list of Harmony IDs for patches that should run before this patch + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Get the patch method or a DynamicMethod if original patch method is a patch factory + The original method/constructor + The method of the patch + + + + Determines whether patches are equal + The other patch + true if equal + + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + + Hash function + A hash code + + + + A PatchClassProcessor used to turn on a class/type into patches + + + + Creates an empty patch class processor + The Harmony instance + The class to process + + + + Applies the patches + A list of all created replacement methods or null if patch class is not annotated + + + + A group of patches + + + + A collection of prefix + + + + A collection of postfix + + + + A collection of transpiler + + + + A collection of finalizer + + + + Gets all owners (Harmony IDs) or all known patches + The patch owners + + + + Creates a group of patches + An array of prefixes as + An array of postfixes as + An array of transpileres as + An array of finalizeres as + + + + A PatchProcessor handles patches on a method/constructor + + + + Creates an empty patch processor + The Harmony instance + The original method/constructor + + + + Adds a prefix + The prefix as a + A for chaining calls + + + + Adds a prefix + The prefix method + A for chaining calls + + + + Adds a postfix + The postfix as a + A for chaining calls + + + + Adds a postfix + The postfix method + A for chaining calls + + + + Adds a transpiler + The transpiler as a + A for chaining calls + + + + Adds a transpiler + The transpiler method + A for chaining calls + + + + Adds a finalizer + The finalizer as a + A for chaining calls + + + + Adds a finalizer + The finalizer method + A for chaining calls + + + + Gets all patched original methods in the appdomain + An enumeration of patched method/constructor + + + + Applies all registered patches + The generated replacement method + + + + Unpatches patches of a given type and/or Harmony ID + The patch type + Harmony ID or * for any + A for chaining calls + + + + Unpatches a specific patch + The method of the patch + A for chaining calls + + + + Gets patch information on an original + The original method/constructor + The patch information as + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly version keyed by Harmony ID + + + + Returns the methods unmodified list of code instructions + The original method/constructor + Optionally an existing generator that will be used to create all local variables and labels contained in the result (if not specified, an internal generator is used) + A list containing all the original + + + + Returns the methods unmodified list of code instructions + The original method/constructor + A new generator that now contains all local variables and labels contained in the result + A list containing all the original + + + + A low level way to read the body of a method. Used for quick searching in methods + The original method + All instructions as opcode/operand pairs + + + + A patch priority + + + + Patch last + + + + Patch with very low priority + + + + Patch with low priority + + + + Patch with lower than normal priority + + + + Patch with normal priority + + + + Patch with higher than normal priority + + + + Patch with high priority + + + + Patch with very high priority + + + + Patch first + + + + A reverse patcher + + + + Creates a reverse patcher + The Harmony instance + The original method/constructor + Your stand-in stub method as + + + + Applies the patch + The type of patch, see + The generated replacement method + + + + A collection of commonly used transpilers + + + + A transpiler that replaces all occurrences of a given method with another one + The enumeration of to act on + Method or constructor to search for + Method or constructor to replace with + Modified enumeration of + + + + A transpiler that alters instructions that match a predicate by calling an action + The enumeration of to act on + A predicate selecting the instructions to change + An action to apply to matching instructions + Modified enumeration of + + + + A transpiler that logs a text at the beginning of the method + The instructions to act on + The log text + Modified enumeration of + + + + A helper class for reflection related functions + + + + Shortcut for to simplify the use of reflections and make it work for any access level + + + + Shortcut for to simplify the use of reflections and make it work for any access level but only within the current type + + + + Gets a type by name. Prefers a full name with namespace but falls back to the first type matching the name otherwise + The name + A type or null if not found + + + + Gets all type by name from a given assembly. This is a wrapper that respects different .NET versions + The assembly + An array of types + + + + Applies a function going up the type hierarchy and stops at the first non null result + Result type of func() + The class/type to start with + The evaluation function returning T + Returns the first non null result or default(T) when reaching the top level type object + + + + Applies a function going into inner types and stops at the first non null result + Generic type parameter + The class/type to start with + The evaluation function returning T + Returns the first non null result or null with no match + + + + Gets the reflection information for a directly declared field + The class/type where the field is defined + The name of the field + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field by searching the type and all its super types + The class/type where the field is defined + The name of the field (case sensitive) + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field + The class/type where the field is declared + The zero-based index of the field inside the class definition + A field or null when type is null or when the field cannot be found + + + + Gets the reflection information for a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a property by searching the type and all its super types + The class/type + The name + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a directly declared method + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The full name like Namespace.Type1.Type2:MethodName of the type where the method is declared + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the names of all method that are declared in a type + The declaring class/type + A list of method names + + + + Gets the names of all method that are declared in the type of the instance + An instance of the type to search in + A list of method names + + + + Gets the names of all fields that are declared in a type + The declaring class/type + A list of field names + + + + Gets the names of all fields that are declared in the type of the instance + An instance of the type to search in + A list of field names + + + + Gets the names of all properties that are declared in a type + The declaring class/type + A list of property names + + + + Gets the names of all properties that are declared in the type of the instance + An instance of the type to search in + A list of property names + + + + Gets the type of any class member of + A member + The class/type of this member + + + + Test if a class member is actually an concrete implementation + A member + True if the member is a declared + + + + Gets the real implementation of a class member + A member + The member itself if its declared. Otherwise the member that is actually implemented in some base type + + + + Gets the reflection information for a directly declared constructor + The class/type where the constructor is declared + Optional parameters to target a specific overload of the constructor + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the constructor cannot be found + + + + Gets the reflection information for a constructor by searching the type and all its super types + The class/type where the constructor is declared + Optional parameters to target a specific overload of the method + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the method cannot be found + + + + Gets reflection information for all declared constructors + The class/type where the constructors are declared + Optional parameters to only consider static constructors + A list of constructor infos + + + + Gets reflection information for all declared methods + The class/type where the methods are declared + A list of methods + + + + Gets reflection information for all declared properties + The class/type where the properties are declared + A list of properties + + + + Gets reflection information for all declared fields + The class/type where the fields are declared + A list of fields + + + + Gets the return type of a method or constructor + The method/constructor + The return type + + + + Given a type, returns the first inner type matching a recursive search by name + The class/type to start searching at + The name of the inner type (case sensitive) + The inner type or null if type/name is null or if a type with that name cannot be found + + + + Given a type, returns the first inner type matching a recursive search with a predicate + The class/type to start searching at + The predicate to search with + The inner type or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first method matching a predicate + The class/type to start searching at + The predicate to search with + The method or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first constructor matching a predicate + The class/type to start searching at + The predicate to search with + The constructor info or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first property matching a predicate + The class/type to start searching at + The predicate to search with + The property or null if type/predicate is null or if a type with that name cannot be found + + + + Returns an array containing the type of each object in the given array + An array of objects + An array of types or an empty array if parameters is null (if an object is null, the type for it will be object) + + + + Creates an array of input parameters for a given method and a given set of potential inputs + The method/constructor you are planing to call + The possible input parameters in any order + An object array matching the method signature + + + + A read/writable reference to an instance field + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The runtime instance to access the field (leave empty for static fields) + An readable/assignable object representing the field + + + + Creates an instance field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + A read and writable field reference delegate + + + + Creates an instance field reference for a specific instance + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The instance + The name of the field + An readable/assignable object representing the field + + + + Creates an instance field reference delegate + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The field of the field + A read and writable delegate + + + + A read/writable reference delegate to a static field + The type of the field + An readable/assignable object representing the static field + + + + Creates a static field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + An readable/assignable object representing the static field + + + + Creates a static field reference delegate + The type of the field + The field + A read and writable delegate + + + + Returns who called the current method + The calling method/constructor (excluding the caller) + + + + Rethrows an exception while preserving its stack trace (throw statement typically clobbers existing stack traces) + The exception to rethrow + + + + Tells you if the current runtime is based on Mono + True if we are running under Mono, false otherwise (.NET) + + + + Throws a missing member runtime exception + The type that is involved + A list of names + + + + Gets default value for a specific type + The class/type + The default value + + + + Creates an (possibly uninitialized) instance of a given type + The class/type + The new instance + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + A copy of the original object but of type T + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + [out] The copy of the original object + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + + + + Makes a deep copy of any object + The original object + The type of the instance that should be created + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + The copy of the original object + + + + Tests if a type is a struct + The type + True if the type is a struct + + + + Tests if a type is a class + The type + True if the type is a class + + + + Tests if a type is a value type + The type + True if the type is a value type + + + + Tests if a type is an integer type + The type + True if the type represents some integer + + + + Tests if a type is a floating point type + The type + True if the type represents some floating point + + + + Tests if a type is a numerical type + The type + True if the type represents some number + + + + Tests if a type is void + The type + True if the type is void + + + + Test whether an instance is of a nullable type + Type of instance + An instance to test + True if instance is of nullable type, false if not + + + + Calculates a combined hash code for an enumeration of objects + The objects + The hash code + + + + General extensions for common cases + + + + Joins an enumeration with a value converter and a delimiter to a string + The inner type of the enumeration + The enumeration + An optional value converter (from T to string) + An optional delimiter + The values joined into a string + + + + Converts an array of types (for example methods arguments) into a human readable form + The array of types + A human readable description including brackets + + + + A full description of a type + The type + A human readable description + + + + A a full description of a method or a constructor without assembly details but with generics + The method/constructor + A human readable description + + + + A helper converting parameter infos to types + The array of parameter infos + An array of types + + + + A helper to access a value via key from a dictionary + The key type + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist + + + + A helper to access a value via key from a dictionary with extra casting + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist or cannot be cast to T + + + + Escapes Unicode and ASCII non printable characters + The string to convert + The string to convert + A string literal surrounded by + + + + Extensions for + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand has the same type and is equal to the value + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand is equal to the value + This is an optimized version of for + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand has the same type and is equal to the given operand + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand is equal to the given operand + This is an optimized version of for + + + + Tests for any form of Ldarg* + The + The (optional) index + True if it matches one of the variations + + + + Tests for Ldarga/Ldarga_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for Starg/Starg_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for any form of Ldloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests for any form of Stloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests if the code instruction branches + The + The label if the instruction is a branch operation or if not + True if the instruction branches + + + + Tests if the code instruction calls the method/constructor + The + The method + True if the instruction calls the method or constructor + + + + Tests if the code instruction loads a constant + The + True if the instruction loads a constant + + + + Tests if the code instruction loads an integer constant + The + The integer constant + True if the instruction loads the constant + + + + Tests if the code instruction loads a floating point constant + The + The floating point constant + True if the instruction loads the constant + + + + Tests if the code instruction loads an enum constant + The + The enum + True if the instruction loads the constant + + + + Tests if the code instruction loads a field + The + The field + Set to true if the address of the field is loaded + True if the instruction loads the field + + + + Tests if the code instruction stores a field + The + The field + True if the instruction stores this field + + + + General extensions for collections + + + + A simple way to execute code for every element in a collection + The inner type of the collection + The collection + The action to execute + + + + A simple way to execute code for elements in a collection matching a condition + The inner type of the collection + The collection + The predicate + The action to execute + + + + A helper to add an item to a collection + The inner type of the collection + The collection + The item to add + The collection containing the item + + + + A helper to add an item to an array + The inner type of the collection + The array + The item to add + The array containing the item + + + + A helper to add items to an array + The inner type of the collection + The array + The items to add + The array containing the items + + + + A file log for debugging + + + + Full pathname of the log file, defaults to a file called harmony.log.txt on your Desktop + + + + The indent character. The default is tab + + + + The current indent level + + + + Changes the indentation level + The value to add to the indentation level + + + + Log a string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + The string to log + + + + Logs a list of string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + A list of strings to log (they will not be re-indented) + + + + Returns the log buffer and optionally empties it + True to empty the buffer + The buffer. + + + + Replaces the buffer with new lines + The lines to store + + + + Flushes the log buffer to disk (use in combination with LogBuffered) + + + + Log a string directly to disk. Slower method that prevents missing information in case of a crash + The string to log. + + + + Resets and deletes the log + + + + Logs some bytes as hex values + The pointer to some memory + The length of bytes to log + + + + A helper class to retrieve reflection info for non-private methods + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The generic result type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + A reflection helper to read and write private elements + The result type defined by GetValue() + + + + Creates a traverse instance from an existing instance + The existing instance + + + + Gets/Sets the current value + The value to read or write + + + + A reflection helper to read and write private elements + + + + Creates a new traverse instance from a class/type + The class/type + A instance + + + + Creates a new traverse instance from a class T + The class + A instance + + + + Creates a new traverse instance from an instance + The object + A instance + + + + Creates a new traverse instance from a named type + The type name, for format see + A instance + + + + Creates a new and empty traverse instance + + + + Creates a new traverse instance from a class/type + The class/type + + + + Creates a new traverse instance from an instance + The object + + + + Gets the current value + The value + + + + Gets the current value + The type of the value + The value + + + + Invokes the current method with arguments and returns the result + The method arguments + The value returned by the method + + + + Invokes the current method with arguments and returns the result + The type of the value + The method arguments + The value returned by the method + + + + Sets a value of the current field or property + The value + The same traverse instance + + + + Gets the type of the current field or property + The type + + + + Moves the current traverse instance to a inner type + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type of the field + The type name + A traverse instance + + + + Gets all fields of the current type + A list of field names + + + + Moves the current traverse instance to a property + The type name + Optional property index + A traverse instance + + + + Moves the current traverse instance to a field + The type of the property + The type name + Optional property index + A traverse instance + + + + Gets all properties of the current type + A list of property names + + + + Moves the current traverse instance to a method + The name of the method + The arguments defining the argument types of the method overload + A traverse instance + + + + Moves the current traverse instance to a method + The name of the method + The argument types of the method + The arguments for the method + A traverse instance + + + + Gets all methods of the current type + A list of method names + + + + Checks if the current traverse instance is for a field + True if its a field + + + + Checks if the current traverse instance is for a property + True if its a property + + + + Checks if the current traverse instance is for a method + True if its a method + + + + Checks if the current traverse instance is for a type + True if its a type + + + + Iterates over all fields of the current type and executes a traverse action + Original object + The action receiving a instance for each field + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each field pair + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the field pair and the instances + + + + Iterates over all properties of the current type and executes a traverse action + Original object + The action receiving a instance for each property + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each property pair + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the property pair and the instances + + + + A default field action that copies fields to fields + + + + Returns a string that represents the current traverse + A string representation + + + + diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net472/0Harmony.dll b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net472/0Harmony.dll new file mode 100644 index 0000000..dd39263 Binary files /dev/null and b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net472/0Harmony.dll differ diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net472/0Harmony.xml b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net472/0Harmony.xml new file mode 100644 index 0000000..a17cc8f --- /dev/null +++ b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net472/0Harmony.xml @@ -0,0 +1,2476 @@ + + + + 0Harmony + + + + A factory to create delegate types + + + Default constructor + + + Creates a delegate type for a method + The method + The new delegate type + + + + A getter delegate type + Type that getter gets field/property value from + Type of the value that getter gets + The instance get getter uses + An delegate + + + + A setter delegate type + Type that setter sets field/property value for + Type of the value that setter sets + The instance the setter uses + The value the setter uses + An delegate + + + + A constructor delegate type + Type that constructor creates + An delegate + + + + A helper class for fast access to getters and setters + + + Creates an instantiation delegate + Type that constructor creates + The new instantiation delegate + + + + Creates an getter delegate for a property + Type that getter reads property from + Type of the property that gets accessed + The property + The new getter delegate + + + + Creates an getter delegate for a field + Type that getter reads field from + Type of the field that gets accessed + The field + The new getter delegate + + + + Creates an getter delegate for a field (with a list of possible field names) + Type that getter reads field/property from + Type of the field/property that gets accessed + A list of possible field names + The new getter delegate + + + + Creates an setter delegate + Type that setter assigns property value to + Type of the property that gets assigned + The property + The new setter delegate + + + + Creates an setter delegate for a field + Type that setter assigns field value to + Type of the field that gets assigned + The field + The new getter delegate + + + + A delegate to invoke a method + The instance + The method parameters + The method result + + + A helper class to invoke method with delegates + + + Creates a fast invocation handler from a method + The method to invoke + Controls if boxed value object is accessed/updated directly + The + + + The directBoxValueAccess option controls how value types passed by reference (e.g. ref int, out my_struct) are handled in the arguments array + passed to the fast invocation handler. + Since the arguments array is an object array, any value types contained within it are actually references to a boxed value object. + Like any other object, there can be other references to such boxed value objects, other than the reference within the arguments array. + For example, + + var val = 5; + var box = (object)val; + var arr = new object[] { box }; + handler(arr); // for a method with parameter signature: ref/out/in int + + + + + If directBoxValueAccess is true, the boxed value object is accessed (and potentially updated) directly when the handler is called, + such that all references to the boxed object reflect the potentially updated value. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, both box and arr[0] + now reflect the value 10. Note that the original val is not updated, since boxing always copies the value into the new boxed value object. + + + If directBoxValueAccess is false (default), the boxed value object in the arguments array is replaced with a "reboxed" value object, + such that potential updates to the value are reflected only in the arguments array. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, only arr[0] now reflects the value 10. + + + + + A low level memory helper + + + Mark method for no inlining (currently only works on Mono) + The method/constructor to change + + + Detours a method + The original method/constructor + The replacement method/constructor + An error string + + + + Writes a jump to memory + The memory address + Jump destination + An error string + + + + Gets the start of a method in memory + The method/constructor + [out] Details of the exception + The method start address + + + + special parameter names that can be used in prefix and postfix methods + + + Patch function helpers + + + Adds a prefix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a prefix + The patch info + The owner (Harmony ID) + + + + Adds a postfix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a postfix + The patch info + The owner (Harmony ID) + + + + Adds a transpiler + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a transpiler + The patch info + The owner (Harmony ID) + + + + Adds a finalizer + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a finalizer + The patch info + The owner (Harmony ID) + + + + Removes a patch method + The patch info + The patch method + + + + Gets sorted patch methods + The original method + Patches to sort + Use debug mode + The sorted patch methods + + + + Creates new replacement method with the latest patches and detours the original method + The original method + Information describing the patches + The newly created replacement method + + + + Creates a patch sorter + Array of patches that will be sorted + Use debugging + + + Sorts internal PatchSortingWrapper collection and caches the results. + After first run the result is provided from the cache. + The original method + The sorted patch methods + + + Checks if the sorter was created with the same patch list and as a result can be reused to + get the sorted order of the patches. + List of patches to check against + true if equal + + + Removes one unresolved dependency from the least important patch. + + + Outputs all unblocked patches from the waiting list to results list + + + Adds patch to both results list and handled patches set + Patch to add + + + Wrapper used over the Patch object to allow faster dependency access and + dependency removal in case of cyclic dependencies + + + Create patch wrapper object used for sorting + Patch to wrap + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + Determines whether patches are equal + The other patch + true if equal + + + Hash function + A hash code + + + Bidirectionally registers Patches as after dependencies + List of dependencies to register + + + Bidirectionally registers Patches as before dependencies + List of dependencies to register + + + Bidirectionally removes Patch from after dependencies + Patch to remove + + + Bidirectionally removes Patch from before dependencies + Patch to remove + + + Specifies the type of method + + + + This is a normal method + + + This is a getter + + + This is a setter + + + This is a constructor + + + This is a static constructor + + + Specifies the type of argument + + + + This is a normal argument + + + This is a reference argument (ref) + + + This is an out argument (out) + + + This is a pointer argument (&) + + + Specifies the type of patch + + + + Any patch + + + A prefix patch + + + A postfix patch + + + A transpiler + + + A finalizer + + + A reverse patch + + + Specifies the type of reverse patch + + + + Use the unmodified original method (directly from IL) + + + Use the original as it is right now including previous patches but excluding future ones + + + The base class for all Harmony annotations (not meant to be used directly) + + + + The common information for all attributes + + + Annotation to define your Harmony patch methods + + + + An empty annotation can be used together with TargetMethod(s) + + + + An annotation that specifies a class to patch + The declaring class/type + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The argument types of the method or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + Annotation to define your standin methods for reverse patching + + + + An annotation that specifies the type of reverse patching + The of the reverse patch + + + + A Harmony annotation to define that all methods in a class are to be patched + + + + A Harmony annotation + + + + A Harmony annotation to define patch priority + The priority + + + + A Harmony annotation + + + + A Harmony annotation to define that a patch comes before another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to define that a patch comes after another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to debug a patch (output uses to log to your Desktop) + + + + Specifies the Prepare function in a patch class + + + + Specifies the Cleanup function in a patch class + + + + Specifies the TargetMethod function in a patch class + + + + Specifies the TargetMethods function in a patch class + + + + Specifies the Prefix function in a patch class + + + + Specifies the Postfix function in a patch class + + + + Specifies the Transpiler function in a patch class + + + + Specifies the Finalizer function in a patch class + + + + A Harmony annotation + + + + The name of the original argument + + + + The index of the original argument + + + + The new name of the original argument + + + + An annotation to declare injected arguments by name + + + + An annotation to declare injected arguments by index + Zero-based index + + + + An annotation to declare injected arguments by renaming them + Name of the original argument + New name + + + + An annotation to declare injected arguments by index and renaming them + Zero-based index + New name + + + + An abstract wrapper around OpCode and their operands. Used by transpilers + + + + The opcode + + + + The operand + + + + All labels defined on this instruction + + + + All exception block boundaries defined on this instruction + + + + Creates a new CodeInstruction with a given opcode and optional operand + The opcode + The operand + + + + Create a full copy (including labels and exception blocks) of a CodeInstruction + The to copy + + + + Clones a CodeInstruction and resets its labels and exception blocks + A lightweight copy of this code instruction + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its opcode + The opcode + A copy of this CodeInstruction with a new opcode + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its operand + The operand + A copy of this CodeInstruction with a new operand + + + + Returns a string representation of the code instruction + A string representation of the code instruction + + + + Exception block types + + + + The beginning of an exception block + + + + The beginning of a catch block + + + + The beginning of an except filter block + + + + The beginning of a fault block + + + + The beginning of a finally block + + + + The end of an exception block + + + + An exception block + + + + Block type + + + + Catch type + + + + Creates an exception block + The + The catch type + + + + The Harmony instance is the main entry to Harmony. After creating one with an unique identifier, it is used to patch and query the current application domain + + + + The unique identifier + + + + Set to true before instantiating Harmony to debug Harmony or use an environment variable to set HARMONY_DEBUG to '1' like this: cmd /C "set HARMONY_DEBUG=1 && game.exe" + This is for full debugging. To debug only specific patches, use the attribute + + + + Creates a new Harmony instance + A unique identifier (you choose your own) + A Harmony instance + + + + Searches the current assembly for Harmony annotations and uses them to create patches + + + + Creates a empty patch processor for an original method + The original method/constructor + A new instance + + + + Creates a patch class processor from an annotated class + The class/type + A new instance + + + + Creates a reverse patcher for one of your stub methods + The original method/constructor + The stand-in stub method as + A new instance + + + + Searches an assembly for Harmony annotations and uses them to create patches + The assembly + + + + Creates patches by manually specifying the methods + The original method/constructor + An optional prefix method wrapped in a object + An optional postfix method wrapped in a object + An optional transpiler method wrapped in a object + An optional finalizer method wrapped in a object + The replacement method that was created to patch the original method + + + + Patches a foreign method onto a stub method of yours and optionally applies transpilers during the process + The original method/constructor you want to duplicate + Your stub method as that will become the original. Needs to have the correct signature (either original or whatever your transpilers generates) + An optional transpiler as method that will be applied during the process + The replacement method that was created to patch the stub method + + + + Unpatches methods + The optional Harmony ID to restrict unpatching to a specific instance + This method could be static if it wasn't for the fact that unpatching creates a new replacement method that contains your harmony ID + + + + Unpatches a method + The original method/constructor + The + The optional Harmony ID to restrict unpatching to a specific instance + + + + Unpatches a method + The original method/constructor + The patch method as method to remove + + + + Test for patches from a specific Harmony ID + The Harmony ID + True if patches for this ID exist + + + + Gets patch information for a given original method + The original method/constructor + The patch information as + + + + Gets the methods this instance has patched + An enumeration of original methods/constructors + + + + Gets all patched original methods in the appdomain + An enumeration of patched original methods/constructors + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly versions keyed by Harmony IDs + + + + Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure + + + + Default serialization constructor (not implemented) + The info + The context + + + + Get a list of IL instructions in pairs of offset+code + A list of key/value pairs which represent an offset and the code at that offset + + + + Get a list of IL instructions without offsets + A list of + + + + Get the error offset of the errornous IL instruction + The offset + + + + Get the index of the errornous IL instruction + The index into the list of instructions or -1 if not found + + + + A wrapper around a method to use it as a patch (for example a Prefix) + + + + The original method + + + + Class/type declaring this patch + + + + Patch method name + + + + Optional patch + + + + Array of argument types of the patch method + + + + of the patch + + + + Install this patch before patches with these Harmony IDs + + + + Install this patch after patches with these Harmony IDs + + + + Reverse patch type, see + + + + Create debug output for this patch + + + + Default constructor + + + + Creates a patch from a given method + The original method + + + + Creates a patch from a given method + The original method + The patch + A list of harmony IDs that should come after this patch + A list of harmony IDs that should come before this patch + Set to true to generate debug output + + + + Creates a patch from a given method + The patch class/type + The patch method name + The optional argument types of the patch method (for overloaded methods) + + + + Gets the names of all internal patch info fields + A list of field names + + + + Merges annotations + The list of to merge + The merged + + + + Returns a string that represents the annotation + A string representation + + + + Annotation extensions + + + + Copies annotation information + The source + The destination + + + + Clones an annotation + The to clone + A copied + + + + Merges annotations + The master + The detail + A new, merged + + + + Gets all annotations on a class/type + The class/type + A list of all + + + + Gets merged annotations on a class/type + The class/type + The merged + + + + Gets all annotations on a method + The method/constructor + A list of + + + + Gets merged annotations on a method + The method/constructor + The merged + + + + + A mutable representation of an inline signature, similar to Mono.Cecil's CallSite. + Used by the calli instruction, can be used by transpilers + + + + + See + + + + See + + + + See + + + + The list of all parameter types or function pointer signatures received by the call site + + + + The return type or function pointer signature returned by the call site + + + + Returns a string representation of the inline signature + A string representation of the inline signature + + + + + A mutable representation of a parameter type with an attached type modifier, + similar to Mono.Cecil's OptionalModifierType / RequiredModifierType and C#'s modopt / modreq + + + + + Whether this is a modopt (optional modifier type) or a modreq (required modifier type) + + + + The modifier type attached to the parameter type + + + + The modified parameter type + + + + Returns a string representation of the modifier type + A string representation of the modifier type + + + + Patch serialization + + + + Control the binding of a serialized object to a type + Specifies the assembly name of the serialized object + Specifies the type name of the serialized object + The type of the object the formatter creates a new instance of + + + + Serializes a patch info + The + The serialized data + + + + Deserialize a patch info + The serialized data + A + + + + Compare function to sort patch priorities + The patch + Zero-based index + The priority + A standard sort integer (-1, 0, 1) + + + + Serializable patch information + + + + Prefixes as an array of + + + + Postfixes as an array of + + + + Transpilers as an array of + + + + Finalizers as an array of + + + + Default constructor + + + + Returns if any of the patches wants debugging turned on + + + + Adds a prefix + + The prefix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for prefixes that should run after this prefix + A list of Harmony IDs for prefixes that should run before this prefix + A flag that will log the replacement method via every time this prefix is used to build the replacement, even in the future + + + + Removes prefixes + The owner of the prefix or * for any prefix + + + + Adds a postfix + The postfix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for postfixes that should run after this postfix + A list of Harmony IDs for postfixes that should run before this postfix + A flag that will log the replacement method via every time this postfix is used to build the replacement, even in the future + + + + Removes postfixes + The owner of the postfix or * for any postfix + + + + Adds a transpiler + The transpiler method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for transpilers that should run after this transpiler + A list of Harmony IDs for transpilers that should run before this transpiler + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes transpilers + The owner of the transpiler or * for any transpiler + + + + Adds a finalizer + The finalizer method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for finalizers that should run after this finalizer + A list of Harmony IDs for finalizers that should run before this finalizer + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes finalizers + The owner of the finalizer or * for any finalizer + + + + Removes a patch using its method + The method of the patch to remove + + + + A serializable patch + + + + Zero-based index + + + + The owner (Harmony ID) + + + + The priority, see + + + + Keep this patch before the patches indicated in the list of Harmony IDs + + + + Keep this patch after the patches indicated in the list of Harmony IDs + + + + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + The method of the static patch method + + + + Creates a patch + The method of the patch + Zero-based index + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for patches that should run after this patch + A list of Harmony IDs for patches that should run before this patch + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Get the patch method or a DynamicMethod if original patch method is a patch factory + The original method/constructor + The method of the patch + + + + Determines whether patches are equal + The other patch + true if equal + + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + + Hash function + A hash code + + + + A PatchClassProcessor used to turn on a class/type into patches + + + + Creates an empty patch class processor + The Harmony instance + The class to process + + + + Applies the patches + A list of all created replacement methods or null if patch class is not annotated + + + + A group of patches + + + + A collection of prefix + + + + A collection of postfix + + + + A collection of transpiler + + + + A collection of finalizer + + + + Gets all owners (Harmony IDs) or all known patches + The patch owners + + + + Creates a group of patches + An array of prefixes as + An array of postfixes as + An array of transpileres as + An array of finalizeres as + + + + A PatchProcessor handles patches on a method/constructor + + + + Creates an empty patch processor + The Harmony instance + The original method/constructor + + + + Adds a prefix + The prefix as a + A for chaining calls + + + + Adds a prefix + The prefix method + A for chaining calls + + + + Adds a postfix + The postfix as a + A for chaining calls + + + + Adds a postfix + The postfix method + A for chaining calls + + + + Adds a transpiler + The transpiler as a + A for chaining calls + + + + Adds a transpiler + The transpiler method + A for chaining calls + + + + Adds a finalizer + The finalizer as a + A for chaining calls + + + + Adds a finalizer + The finalizer method + A for chaining calls + + + + Gets all patched original methods in the appdomain + An enumeration of patched method/constructor + + + + Applies all registered patches + The generated replacement method + + + + Unpatches patches of a given type and/or Harmony ID + The patch type + Harmony ID or * for any + A for chaining calls + + + + Unpatches a specific patch + The method of the patch + A for chaining calls + + + + Gets patch information on an original + The original method/constructor + The patch information as + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly version keyed by Harmony ID + + + + Returns the methods unmodified list of code instructions + The original method/constructor + Optionally an existing generator that will be used to create all local variables and labels contained in the result (if not specified, an internal generator is used) + A list containing all the original + + + + Returns the methods unmodified list of code instructions + The original method/constructor + A new generator that now contains all local variables and labels contained in the result + A list containing all the original + + + + A low level way to read the body of a method. Used for quick searching in methods + The original method + All instructions as opcode/operand pairs + + + + A patch priority + + + + Patch last + + + + Patch with very low priority + + + + Patch with low priority + + + + Patch with lower than normal priority + + + + Patch with normal priority + + + + Patch with higher than normal priority + + + + Patch with high priority + + + + Patch with very high priority + + + + Patch first + + + + A reverse patcher + + + + Creates a reverse patcher + The Harmony instance + The original method/constructor + Your stand-in stub method as + + + + Applies the patch + The type of patch, see + The generated replacement method + + + + A collection of commonly used transpilers + + + + A transpiler that replaces all occurrences of a given method with another one + The enumeration of to act on + Method or constructor to search for + Method or constructor to replace with + Modified enumeration of + + + + A transpiler that alters instructions that match a predicate by calling an action + The enumeration of to act on + A predicate selecting the instructions to change + An action to apply to matching instructions + Modified enumeration of + + + + A transpiler that logs a text at the beginning of the method + The instructions to act on + The log text + Modified enumeration of + + + + A helper class for reflection related functions + + + + Shortcut for to simplify the use of reflections and make it work for any access level + + + + Shortcut for to simplify the use of reflections and make it work for any access level but only within the current type + + + + Gets a type by name. Prefers a full name with namespace but falls back to the first type matching the name otherwise + The name + A type or null if not found + + + + Gets all type by name from a given assembly. This is a wrapper that respects different .NET versions + The assembly + An array of types + + + + Applies a function going up the type hierarchy and stops at the first non null result + Result type of func() + The class/type to start with + The evaluation function returning T + Returns the first non null result or default(T) when reaching the top level type object + + + + Applies a function going into inner types and stops at the first non null result + Generic type parameter + The class/type to start with + The evaluation function returning T + Returns the first non null result or null with no match + + + + Gets the reflection information for a directly declared field + The class/type where the field is defined + The name of the field + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field by searching the type and all its super types + The class/type where the field is defined + The name of the field (case sensitive) + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field + The class/type where the field is declared + The zero-based index of the field inside the class definition + A field or null when type is null or when the field cannot be found + + + + Gets the reflection information for a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a property by searching the type and all its super types + The class/type + The name + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a directly declared method + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The full name like Namespace.Type1.Type2:MethodName of the type where the method is declared + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the names of all method that are declared in a type + The declaring class/type + A list of method names + + + + Gets the names of all method that are declared in the type of the instance + An instance of the type to search in + A list of method names + + + + Gets the names of all fields that are declared in a type + The declaring class/type + A list of field names + + + + Gets the names of all fields that are declared in the type of the instance + An instance of the type to search in + A list of field names + + + + Gets the names of all properties that are declared in a type + The declaring class/type + A list of property names + + + + Gets the names of all properties that are declared in the type of the instance + An instance of the type to search in + A list of property names + + + + Gets the type of any class member of + A member + The class/type of this member + + + + Test if a class member is actually an concrete implementation + A member + True if the member is a declared + + + + Gets the real implementation of a class member + A member + The member itself if its declared. Otherwise the member that is actually implemented in some base type + + + + Gets the reflection information for a directly declared constructor + The class/type where the constructor is declared + Optional parameters to target a specific overload of the constructor + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the constructor cannot be found + + + + Gets the reflection information for a constructor by searching the type and all its super types + The class/type where the constructor is declared + Optional parameters to target a specific overload of the method + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the method cannot be found + + + + Gets reflection information for all declared constructors + The class/type where the constructors are declared + Optional parameters to only consider static constructors + A list of constructor infos + + + + Gets reflection information for all declared methods + The class/type where the methods are declared + A list of methods + + + + Gets reflection information for all declared properties + The class/type where the properties are declared + A list of properties + + + + Gets reflection information for all declared fields + The class/type where the fields are declared + A list of fields + + + + Gets the return type of a method or constructor + The method/constructor + The return type + + + + Given a type, returns the first inner type matching a recursive search by name + The class/type to start searching at + The name of the inner type (case sensitive) + The inner type or null if type/name is null or if a type with that name cannot be found + + + + Given a type, returns the first inner type matching a recursive search with a predicate + The class/type to start searching at + The predicate to search with + The inner type or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first method matching a predicate + The class/type to start searching at + The predicate to search with + The method or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first constructor matching a predicate + The class/type to start searching at + The predicate to search with + The constructor info or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first property matching a predicate + The class/type to start searching at + The predicate to search with + The property or null if type/predicate is null or if a type with that name cannot be found + + + + Returns an array containing the type of each object in the given array + An array of objects + An array of types or an empty array if parameters is null (if an object is null, the type for it will be object) + + + + Creates an array of input parameters for a given method and a given set of potential inputs + The method/constructor you are planing to call + The possible input parameters in any order + An object array matching the method signature + + + + A read/writable reference to an instance field + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The runtime instance to access the field (leave empty for static fields) + An readable/assignable object representing the field + + + + Creates an instance field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + A read and writable field reference delegate + + + + Creates an instance field reference for a specific instance + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The instance + The name of the field + An readable/assignable object representing the field + + + + Creates an instance field reference delegate + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The field of the field + A read and writable delegate + + + + A read/writable reference delegate to a static field + The type of the field + An readable/assignable object representing the static field + + + + Creates a static field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + An readable/assignable object representing the static field + + + + Creates a static field reference delegate + The type of the field + The field + A read and writable delegate + + + + Returns who called the current method + The calling method/constructor (excluding the caller) + + + + Rethrows an exception while preserving its stack trace (throw statement typically clobbers existing stack traces) + The exception to rethrow + + + + Tells you if the current runtime is based on Mono + True if we are running under Mono, false otherwise (.NET) + + + + Throws a missing member runtime exception + The type that is involved + A list of names + + + + Gets default value for a specific type + The class/type + The default value + + + + Creates an (possibly uninitialized) instance of a given type + The class/type + The new instance + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + A copy of the original object but of type T + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + [out] The copy of the original object + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + + + + Makes a deep copy of any object + The original object + The type of the instance that should be created + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + The copy of the original object + + + + Tests if a type is a struct + The type + True if the type is a struct + + + + Tests if a type is a class + The type + True if the type is a class + + + + Tests if a type is a value type + The type + True if the type is a value type + + + + Tests if a type is an integer type + The type + True if the type represents some integer + + + + Tests if a type is a floating point type + The type + True if the type represents some floating point + + + + Tests if a type is a numerical type + The type + True if the type represents some number + + + + Tests if a type is void + The type + True if the type is void + + + + Test whether an instance is of a nullable type + Type of instance + An instance to test + True if instance is of nullable type, false if not + + + + Calculates a combined hash code for an enumeration of objects + The objects + The hash code + + + + General extensions for common cases + + + + Joins an enumeration with a value converter and a delimiter to a string + The inner type of the enumeration + The enumeration + An optional value converter (from T to string) + An optional delimiter + The values joined into a string + + + + Converts an array of types (for example methods arguments) into a human readable form + The array of types + A human readable description including brackets + + + + A full description of a type + The type + A human readable description + + + + A a full description of a method or a constructor without assembly details but with generics + The method/constructor + A human readable description + + + + A helper converting parameter infos to types + The array of parameter infos + An array of types + + + + A helper to access a value via key from a dictionary + The key type + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist + + + + A helper to access a value via key from a dictionary with extra casting + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist or cannot be cast to T + + + + Escapes Unicode and ASCII non printable characters + The string to convert + The string to convert + A string literal surrounded by + + + + Extensions for + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand has the same type and is equal to the value + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand is equal to the value + This is an optimized version of for + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand has the same type and is equal to the given operand + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand is equal to the given operand + This is an optimized version of for + + + + Tests for any form of Ldarg* + The + The (optional) index + True if it matches one of the variations + + + + Tests for Ldarga/Ldarga_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for Starg/Starg_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for any form of Ldloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests for any form of Stloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests if the code instruction branches + The + The label if the instruction is a branch operation or if not + True if the instruction branches + + + + Tests if the code instruction calls the method/constructor + The + The method + True if the instruction calls the method or constructor + + + + Tests if the code instruction loads a constant + The + True if the instruction loads a constant + + + + Tests if the code instruction loads an integer constant + The + The integer constant + True if the instruction loads the constant + + + + Tests if the code instruction loads a floating point constant + The + The floating point constant + True if the instruction loads the constant + + + + Tests if the code instruction loads an enum constant + The + The enum + True if the instruction loads the constant + + + + Tests if the code instruction loads a field + The + The field + Set to true if the address of the field is loaded + True if the instruction loads the field + + + + Tests if the code instruction stores a field + The + The field + True if the instruction stores this field + + + + General extensions for collections + + + + A simple way to execute code for every element in a collection + The inner type of the collection + The collection + The action to execute + + + + A simple way to execute code for elements in a collection matching a condition + The inner type of the collection + The collection + The predicate + The action to execute + + + + A helper to add an item to a collection + The inner type of the collection + The collection + The item to add + The collection containing the item + + + + A helper to add an item to an array + The inner type of the collection + The array + The item to add + The array containing the item + + + + A helper to add items to an array + The inner type of the collection + The array + The items to add + The array containing the items + + + + A file log for debugging + + + + Full pathname of the log file, defaults to a file called harmony.log.txt on your Desktop + + + + The indent character. The default is tab + + + + The current indent level + + + + Changes the indentation level + The value to add to the indentation level + + + + Log a string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + The string to log + + + + Logs a list of string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + A list of strings to log (they will not be re-indented) + + + + Returns the log buffer and optionally empties it + True to empty the buffer + The buffer. + + + + Replaces the buffer with new lines + The lines to store + + + + Flushes the log buffer to disk (use in combination with LogBuffered) + + + + Log a string directly to disk. Slower method that prevents missing information in case of a crash + The string to log. + + + + Resets and deletes the log + + + + Logs some bytes as hex values + The pointer to some memory + The length of bytes to log + + + + A helper class to retrieve reflection info for non-private methods + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The generic result type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + A reflection helper to read and write private elements + The result type defined by GetValue() + + + + Creates a traverse instance from an existing instance + The existing instance + + + + Gets/Sets the current value + The value to read or write + + + + A reflection helper to read and write private elements + + + + Creates a new traverse instance from a class/type + The class/type + A instance + + + + Creates a new traverse instance from a class T + The class + A instance + + + + Creates a new traverse instance from an instance + The object + A instance + + + + Creates a new traverse instance from a named type + The type name, for format see + A instance + + + + Creates a new and empty traverse instance + + + + Creates a new traverse instance from a class/type + The class/type + + + + Creates a new traverse instance from an instance + The object + + + + Gets the current value + The value + + + + Gets the current value + The type of the value + The value + + + + Invokes the current method with arguments and returns the result + The method arguments + The value returned by the method + + + + Invokes the current method with arguments and returns the result + The type of the value + The method arguments + The value returned by the method + + + + Sets a value of the current field or property + The value + The same traverse instance + + + + Gets the type of the current field or property + The type + + + + Moves the current traverse instance to a inner type + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type of the field + The type name + A traverse instance + + + + Gets all fields of the current type + A list of field names + + + + Moves the current traverse instance to a property + The type name + Optional property index + A traverse instance + + + + Moves the current traverse instance to a field + The type of the property + The type name + Optional property index + A traverse instance + + + + Gets all properties of the current type + A list of property names + + + + Moves the current traverse instance to a method + The name of the method + The arguments defining the argument types of the method overload + A traverse instance + + + + Moves the current traverse instance to a method + The name of the method + The argument types of the method + The arguments for the method + A traverse instance + + + + Gets all methods of the current type + A list of method names + + + + Checks if the current traverse instance is for a field + True if its a field + + + + Checks if the current traverse instance is for a property + True if its a property + + + + Checks if the current traverse instance is for a method + True if its a method + + + + Checks if the current traverse instance is for a type + True if its a type + + + + Iterates over all fields of the current type and executes a traverse action + Original object + The action receiving a instance for each field + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each field pair + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the field pair and the instances + + + + Iterates over all properties of the current type and executes a traverse action + Original object + The action receiving a instance for each property + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each property pair + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the property pair and the instances + + + + A default field action that copies fields to fields + + + + Returns a string that represents the current traverse + A string representation + + + + diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net48/0Harmony.dll b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net48/0Harmony.dll new file mode 100644 index 0000000..b400fe7 Binary files /dev/null and b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net48/0Harmony.dll differ diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net48/0Harmony.xml b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net48/0Harmony.xml new file mode 100644 index 0000000..a17cc8f --- /dev/null +++ b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/net48/0Harmony.xml @@ -0,0 +1,2476 @@ + + + + 0Harmony + + + + A factory to create delegate types + + + Default constructor + + + Creates a delegate type for a method + The method + The new delegate type + + + + A getter delegate type + Type that getter gets field/property value from + Type of the value that getter gets + The instance get getter uses + An delegate + + + + A setter delegate type + Type that setter sets field/property value for + Type of the value that setter sets + The instance the setter uses + The value the setter uses + An delegate + + + + A constructor delegate type + Type that constructor creates + An delegate + + + + A helper class for fast access to getters and setters + + + Creates an instantiation delegate + Type that constructor creates + The new instantiation delegate + + + + Creates an getter delegate for a property + Type that getter reads property from + Type of the property that gets accessed + The property + The new getter delegate + + + + Creates an getter delegate for a field + Type that getter reads field from + Type of the field that gets accessed + The field + The new getter delegate + + + + Creates an getter delegate for a field (with a list of possible field names) + Type that getter reads field/property from + Type of the field/property that gets accessed + A list of possible field names + The new getter delegate + + + + Creates an setter delegate + Type that setter assigns property value to + Type of the property that gets assigned + The property + The new setter delegate + + + + Creates an setter delegate for a field + Type that setter assigns field value to + Type of the field that gets assigned + The field + The new getter delegate + + + + A delegate to invoke a method + The instance + The method parameters + The method result + + + A helper class to invoke method with delegates + + + Creates a fast invocation handler from a method + The method to invoke + Controls if boxed value object is accessed/updated directly + The + + + The directBoxValueAccess option controls how value types passed by reference (e.g. ref int, out my_struct) are handled in the arguments array + passed to the fast invocation handler. + Since the arguments array is an object array, any value types contained within it are actually references to a boxed value object. + Like any other object, there can be other references to such boxed value objects, other than the reference within the arguments array. + For example, + + var val = 5; + var box = (object)val; + var arr = new object[] { box }; + handler(arr); // for a method with parameter signature: ref/out/in int + + + + + If directBoxValueAccess is true, the boxed value object is accessed (and potentially updated) directly when the handler is called, + such that all references to the boxed object reflect the potentially updated value. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, both box and arr[0] + now reflect the value 10. Note that the original val is not updated, since boxing always copies the value into the new boxed value object. + + + If directBoxValueAccess is false (default), the boxed value object in the arguments array is replaced with a "reboxed" value object, + such that potential updates to the value are reflected only in the arguments array. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, only arr[0] now reflects the value 10. + + + + + A low level memory helper + + + Mark method for no inlining (currently only works on Mono) + The method/constructor to change + + + Detours a method + The original method/constructor + The replacement method/constructor + An error string + + + + Writes a jump to memory + The memory address + Jump destination + An error string + + + + Gets the start of a method in memory + The method/constructor + [out] Details of the exception + The method start address + + + + special parameter names that can be used in prefix and postfix methods + + + Patch function helpers + + + Adds a prefix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a prefix + The patch info + The owner (Harmony ID) + + + + Adds a postfix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a postfix + The patch info + The owner (Harmony ID) + + + + Adds a transpiler + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a transpiler + The patch info + The owner (Harmony ID) + + + + Adds a finalizer + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a finalizer + The patch info + The owner (Harmony ID) + + + + Removes a patch method + The patch info + The patch method + + + + Gets sorted patch methods + The original method + Patches to sort + Use debug mode + The sorted patch methods + + + + Creates new replacement method with the latest patches and detours the original method + The original method + Information describing the patches + The newly created replacement method + + + + Creates a patch sorter + Array of patches that will be sorted + Use debugging + + + Sorts internal PatchSortingWrapper collection and caches the results. + After first run the result is provided from the cache. + The original method + The sorted patch methods + + + Checks if the sorter was created with the same patch list and as a result can be reused to + get the sorted order of the patches. + List of patches to check against + true if equal + + + Removes one unresolved dependency from the least important patch. + + + Outputs all unblocked patches from the waiting list to results list + + + Adds patch to both results list and handled patches set + Patch to add + + + Wrapper used over the Patch object to allow faster dependency access and + dependency removal in case of cyclic dependencies + + + Create patch wrapper object used for sorting + Patch to wrap + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + Determines whether patches are equal + The other patch + true if equal + + + Hash function + A hash code + + + Bidirectionally registers Patches as after dependencies + List of dependencies to register + + + Bidirectionally registers Patches as before dependencies + List of dependencies to register + + + Bidirectionally removes Patch from after dependencies + Patch to remove + + + Bidirectionally removes Patch from before dependencies + Patch to remove + + + Specifies the type of method + + + + This is a normal method + + + This is a getter + + + This is a setter + + + This is a constructor + + + This is a static constructor + + + Specifies the type of argument + + + + This is a normal argument + + + This is a reference argument (ref) + + + This is an out argument (out) + + + This is a pointer argument (&) + + + Specifies the type of patch + + + + Any patch + + + A prefix patch + + + A postfix patch + + + A transpiler + + + A finalizer + + + A reverse patch + + + Specifies the type of reverse patch + + + + Use the unmodified original method (directly from IL) + + + Use the original as it is right now including previous patches but excluding future ones + + + The base class for all Harmony annotations (not meant to be used directly) + + + + The common information for all attributes + + + Annotation to define your Harmony patch methods + + + + An empty annotation can be used together with TargetMethod(s) + + + + An annotation that specifies a class to patch + The declaring class/type + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The argument types of the method or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + Annotation to define your standin methods for reverse patching + + + + An annotation that specifies the type of reverse patching + The of the reverse patch + + + + A Harmony annotation to define that all methods in a class are to be patched + + + + A Harmony annotation + + + + A Harmony annotation to define patch priority + The priority + + + + A Harmony annotation + + + + A Harmony annotation to define that a patch comes before another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to define that a patch comes after another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to debug a patch (output uses to log to your Desktop) + + + + Specifies the Prepare function in a patch class + + + + Specifies the Cleanup function in a patch class + + + + Specifies the TargetMethod function in a patch class + + + + Specifies the TargetMethods function in a patch class + + + + Specifies the Prefix function in a patch class + + + + Specifies the Postfix function in a patch class + + + + Specifies the Transpiler function in a patch class + + + + Specifies the Finalizer function in a patch class + + + + A Harmony annotation + + + + The name of the original argument + + + + The index of the original argument + + + + The new name of the original argument + + + + An annotation to declare injected arguments by name + + + + An annotation to declare injected arguments by index + Zero-based index + + + + An annotation to declare injected arguments by renaming them + Name of the original argument + New name + + + + An annotation to declare injected arguments by index and renaming them + Zero-based index + New name + + + + An abstract wrapper around OpCode and their operands. Used by transpilers + + + + The opcode + + + + The operand + + + + All labels defined on this instruction + + + + All exception block boundaries defined on this instruction + + + + Creates a new CodeInstruction with a given opcode and optional operand + The opcode + The operand + + + + Create a full copy (including labels and exception blocks) of a CodeInstruction + The to copy + + + + Clones a CodeInstruction and resets its labels and exception blocks + A lightweight copy of this code instruction + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its opcode + The opcode + A copy of this CodeInstruction with a new opcode + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its operand + The operand + A copy of this CodeInstruction with a new operand + + + + Returns a string representation of the code instruction + A string representation of the code instruction + + + + Exception block types + + + + The beginning of an exception block + + + + The beginning of a catch block + + + + The beginning of an except filter block + + + + The beginning of a fault block + + + + The beginning of a finally block + + + + The end of an exception block + + + + An exception block + + + + Block type + + + + Catch type + + + + Creates an exception block + The + The catch type + + + + The Harmony instance is the main entry to Harmony. After creating one with an unique identifier, it is used to patch and query the current application domain + + + + The unique identifier + + + + Set to true before instantiating Harmony to debug Harmony or use an environment variable to set HARMONY_DEBUG to '1' like this: cmd /C "set HARMONY_DEBUG=1 && game.exe" + This is for full debugging. To debug only specific patches, use the attribute + + + + Creates a new Harmony instance + A unique identifier (you choose your own) + A Harmony instance + + + + Searches the current assembly for Harmony annotations and uses them to create patches + + + + Creates a empty patch processor for an original method + The original method/constructor + A new instance + + + + Creates a patch class processor from an annotated class + The class/type + A new instance + + + + Creates a reverse patcher for one of your stub methods + The original method/constructor + The stand-in stub method as + A new instance + + + + Searches an assembly for Harmony annotations and uses them to create patches + The assembly + + + + Creates patches by manually specifying the methods + The original method/constructor + An optional prefix method wrapped in a object + An optional postfix method wrapped in a object + An optional transpiler method wrapped in a object + An optional finalizer method wrapped in a object + The replacement method that was created to patch the original method + + + + Patches a foreign method onto a stub method of yours and optionally applies transpilers during the process + The original method/constructor you want to duplicate + Your stub method as that will become the original. Needs to have the correct signature (either original or whatever your transpilers generates) + An optional transpiler as method that will be applied during the process + The replacement method that was created to patch the stub method + + + + Unpatches methods + The optional Harmony ID to restrict unpatching to a specific instance + This method could be static if it wasn't for the fact that unpatching creates a new replacement method that contains your harmony ID + + + + Unpatches a method + The original method/constructor + The + The optional Harmony ID to restrict unpatching to a specific instance + + + + Unpatches a method + The original method/constructor + The patch method as method to remove + + + + Test for patches from a specific Harmony ID + The Harmony ID + True if patches for this ID exist + + + + Gets patch information for a given original method + The original method/constructor + The patch information as + + + + Gets the methods this instance has patched + An enumeration of original methods/constructors + + + + Gets all patched original methods in the appdomain + An enumeration of patched original methods/constructors + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly versions keyed by Harmony IDs + + + + Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure + + + + Default serialization constructor (not implemented) + The info + The context + + + + Get a list of IL instructions in pairs of offset+code + A list of key/value pairs which represent an offset and the code at that offset + + + + Get a list of IL instructions without offsets + A list of + + + + Get the error offset of the errornous IL instruction + The offset + + + + Get the index of the errornous IL instruction + The index into the list of instructions or -1 if not found + + + + A wrapper around a method to use it as a patch (for example a Prefix) + + + + The original method + + + + Class/type declaring this patch + + + + Patch method name + + + + Optional patch + + + + Array of argument types of the patch method + + + + of the patch + + + + Install this patch before patches with these Harmony IDs + + + + Install this patch after patches with these Harmony IDs + + + + Reverse patch type, see + + + + Create debug output for this patch + + + + Default constructor + + + + Creates a patch from a given method + The original method + + + + Creates a patch from a given method + The original method + The patch + A list of harmony IDs that should come after this patch + A list of harmony IDs that should come before this patch + Set to true to generate debug output + + + + Creates a patch from a given method + The patch class/type + The patch method name + The optional argument types of the patch method (for overloaded methods) + + + + Gets the names of all internal patch info fields + A list of field names + + + + Merges annotations + The list of to merge + The merged + + + + Returns a string that represents the annotation + A string representation + + + + Annotation extensions + + + + Copies annotation information + The source + The destination + + + + Clones an annotation + The to clone + A copied + + + + Merges annotations + The master + The detail + A new, merged + + + + Gets all annotations on a class/type + The class/type + A list of all + + + + Gets merged annotations on a class/type + The class/type + The merged + + + + Gets all annotations on a method + The method/constructor + A list of + + + + Gets merged annotations on a method + The method/constructor + The merged + + + + + A mutable representation of an inline signature, similar to Mono.Cecil's CallSite. + Used by the calli instruction, can be used by transpilers + + + + + See + + + + See + + + + See + + + + The list of all parameter types or function pointer signatures received by the call site + + + + The return type or function pointer signature returned by the call site + + + + Returns a string representation of the inline signature + A string representation of the inline signature + + + + + A mutable representation of a parameter type with an attached type modifier, + similar to Mono.Cecil's OptionalModifierType / RequiredModifierType and C#'s modopt / modreq + + + + + Whether this is a modopt (optional modifier type) or a modreq (required modifier type) + + + + The modifier type attached to the parameter type + + + + The modified parameter type + + + + Returns a string representation of the modifier type + A string representation of the modifier type + + + + Patch serialization + + + + Control the binding of a serialized object to a type + Specifies the assembly name of the serialized object + Specifies the type name of the serialized object + The type of the object the formatter creates a new instance of + + + + Serializes a patch info + The + The serialized data + + + + Deserialize a patch info + The serialized data + A + + + + Compare function to sort patch priorities + The patch + Zero-based index + The priority + A standard sort integer (-1, 0, 1) + + + + Serializable patch information + + + + Prefixes as an array of + + + + Postfixes as an array of + + + + Transpilers as an array of + + + + Finalizers as an array of + + + + Default constructor + + + + Returns if any of the patches wants debugging turned on + + + + Adds a prefix + + The prefix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for prefixes that should run after this prefix + A list of Harmony IDs for prefixes that should run before this prefix + A flag that will log the replacement method via every time this prefix is used to build the replacement, even in the future + + + + Removes prefixes + The owner of the prefix or * for any prefix + + + + Adds a postfix + The postfix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for postfixes that should run after this postfix + A list of Harmony IDs for postfixes that should run before this postfix + A flag that will log the replacement method via every time this postfix is used to build the replacement, even in the future + + + + Removes postfixes + The owner of the postfix or * for any postfix + + + + Adds a transpiler + The transpiler method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for transpilers that should run after this transpiler + A list of Harmony IDs for transpilers that should run before this transpiler + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes transpilers + The owner of the transpiler or * for any transpiler + + + + Adds a finalizer + The finalizer method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for finalizers that should run after this finalizer + A list of Harmony IDs for finalizers that should run before this finalizer + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes finalizers + The owner of the finalizer or * for any finalizer + + + + Removes a patch using its method + The method of the patch to remove + + + + A serializable patch + + + + Zero-based index + + + + The owner (Harmony ID) + + + + The priority, see + + + + Keep this patch before the patches indicated in the list of Harmony IDs + + + + Keep this patch after the patches indicated in the list of Harmony IDs + + + + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + The method of the static patch method + + + + Creates a patch + The method of the patch + Zero-based index + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for patches that should run after this patch + A list of Harmony IDs for patches that should run before this patch + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Get the patch method or a DynamicMethod if original patch method is a patch factory + The original method/constructor + The method of the patch + + + + Determines whether patches are equal + The other patch + true if equal + + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + + Hash function + A hash code + + + + A PatchClassProcessor used to turn on a class/type into patches + + + + Creates an empty patch class processor + The Harmony instance + The class to process + + + + Applies the patches + A list of all created replacement methods or null if patch class is not annotated + + + + A group of patches + + + + A collection of prefix + + + + A collection of postfix + + + + A collection of transpiler + + + + A collection of finalizer + + + + Gets all owners (Harmony IDs) or all known patches + The patch owners + + + + Creates a group of patches + An array of prefixes as + An array of postfixes as + An array of transpileres as + An array of finalizeres as + + + + A PatchProcessor handles patches on a method/constructor + + + + Creates an empty patch processor + The Harmony instance + The original method/constructor + + + + Adds a prefix + The prefix as a + A for chaining calls + + + + Adds a prefix + The prefix method + A for chaining calls + + + + Adds a postfix + The postfix as a + A for chaining calls + + + + Adds a postfix + The postfix method + A for chaining calls + + + + Adds a transpiler + The transpiler as a + A for chaining calls + + + + Adds a transpiler + The transpiler method + A for chaining calls + + + + Adds a finalizer + The finalizer as a + A for chaining calls + + + + Adds a finalizer + The finalizer method + A for chaining calls + + + + Gets all patched original methods in the appdomain + An enumeration of patched method/constructor + + + + Applies all registered patches + The generated replacement method + + + + Unpatches patches of a given type and/or Harmony ID + The patch type + Harmony ID or * for any + A for chaining calls + + + + Unpatches a specific patch + The method of the patch + A for chaining calls + + + + Gets patch information on an original + The original method/constructor + The patch information as + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly version keyed by Harmony ID + + + + Returns the methods unmodified list of code instructions + The original method/constructor + Optionally an existing generator that will be used to create all local variables and labels contained in the result (if not specified, an internal generator is used) + A list containing all the original + + + + Returns the methods unmodified list of code instructions + The original method/constructor + A new generator that now contains all local variables and labels contained in the result + A list containing all the original + + + + A low level way to read the body of a method. Used for quick searching in methods + The original method + All instructions as opcode/operand pairs + + + + A patch priority + + + + Patch last + + + + Patch with very low priority + + + + Patch with low priority + + + + Patch with lower than normal priority + + + + Patch with normal priority + + + + Patch with higher than normal priority + + + + Patch with high priority + + + + Patch with very high priority + + + + Patch first + + + + A reverse patcher + + + + Creates a reverse patcher + The Harmony instance + The original method/constructor + Your stand-in stub method as + + + + Applies the patch + The type of patch, see + The generated replacement method + + + + A collection of commonly used transpilers + + + + A transpiler that replaces all occurrences of a given method with another one + The enumeration of to act on + Method or constructor to search for + Method or constructor to replace with + Modified enumeration of + + + + A transpiler that alters instructions that match a predicate by calling an action + The enumeration of to act on + A predicate selecting the instructions to change + An action to apply to matching instructions + Modified enumeration of + + + + A transpiler that logs a text at the beginning of the method + The instructions to act on + The log text + Modified enumeration of + + + + A helper class for reflection related functions + + + + Shortcut for to simplify the use of reflections and make it work for any access level + + + + Shortcut for to simplify the use of reflections and make it work for any access level but only within the current type + + + + Gets a type by name. Prefers a full name with namespace but falls back to the first type matching the name otherwise + The name + A type or null if not found + + + + Gets all type by name from a given assembly. This is a wrapper that respects different .NET versions + The assembly + An array of types + + + + Applies a function going up the type hierarchy and stops at the first non null result + Result type of func() + The class/type to start with + The evaluation function returning T + Returns the first non null result or default(T) when reaching the top level type object + + + + Applies a function going into inner types and stops at the first non null result + Generic type parameter + The class/type to start with + The evaluation function returning T + Returns the first non null result or null with no match + + + + Gets the reflection information for a directly declared field + The class/type where the field is defined + The name of the field + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field by searching the type and all its super types + The class/type where the field is defined + The name of the field (case sensitive) + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field + The class/type where the field is declared + The zero-based index of the field inside the class definition + A field or null when type is null or when the field cannot be found + + + + Gets the reflection information for a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a property by searching the type and all its super types + The class/type + The name + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a directly declared method + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The full name like Namespace.Type1.Type2:MethodName of the type where the method is declared + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the names of all method that are declared in a type + The declaring class/type + A list of method names + + + + Gets the names of all method that are declared in the type of the instance + An instance of the type to search in + A list of method names + + + + Gets the names of all fields that are declared in a type + The declaring class/type + A list of field names + + + + Gets the names of all fields that are declared in the type of the instance + An instance of the type to search in + A list of field names + + + + Gets the names of all properties that are declared in a type + The declaring class/type + A list of property names + + + + Gets the names of all properties that are declared in the type of the instance + An instance of the type to search in + A list of property names + + + + Gets the type of any class member of + A member + The class/type of this member + + + + Test if a class member is actually an concrete implementation + A member + True if the member is a declared + + + + Gets the real implementation of a class member + A member + The member itself if its declared. Otherwise the member that is actually implemented in some base type + + + + Gets the reflection information for a directly declared constructor + The class/type where the constructor is declared + Optional parameters to target a specific overload of the constructor + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the constructor cannot be found + + + + Gets the reflection information for a constructor by searching the type and all its super types + The class/type where the constructor is declared + Optional parameters to target a specific overload of the method + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the method cannot be found + + + + Gets reflection information for all declared constructors + The class/type where the constructors are declared + Optional parameters to only consider static constructors + A list of constructor infos + + + + Gets reflection information for all declared methods + The class/type where the methods are declared + A list of methods + + + + Gets reflection information for all declared properties + The class/type where the properties are declared + A list of properties + + + + Gets reflection information for all declared fields + The class/type where the fields are declared + A list of fields + + + + Gets the return type of a method or constructor + The method/constructor + The return type + + + + Given a type, returns the first inner type matching a recursive search by name + The class/type to start searching at + The name of the inner type (case sensitive) + The inner type or null if type/name is null or if a type with that name cannot be found + + + + Given a type, returns the first inner type matching a recursive search with a predicate + The class/type to start searching at + The predicate to search with + The inner type or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first method matching a predicate + The class/type to start searching at + The predicate to search with + The method or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first constructor matching a predicate + The class/type to start searching at + The predicate to search with + The constructor info or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first property matching a predicate + The class/type to start searching at + The predicate to search with + The property or null if type/predicate is null or if a type with that name cannot be found + + + + Returns an array containing the type of each object in the given array + An array of objects + An array of types or an empty array if parameters is null (if an object is null, the type for it will be object) + + + + Creates an array of input parameters for a given method and a given set of potential inputs + The method/constructor you are planing to call + The possible input parameters in any order + An object array matching the method signature + + + + A read/writable reference to an instance field + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The runtime instance to access the field (leave empty for static fields) + An readable/assignable object representing the field + + + + Creates an instance field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + A read and writable field reference delegate + + + + Creates an instance field reference for a specific instance + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The instance + The name of the field + An readable/assignable object representing the field + + + + Creates an instance field reference delegate + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The field of the field + A read and writable delegate + + + + A read/writable reference delegate to a static field + The type of the field + An readable/assignable object representing the static field + + + + Creates a static field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + An readable/assignable object representing the static field + + + + Creates a static field reference delegate + The type of the field + The field + A read and writable delegate + + + + Returns who called the current method + The calling method/constructor (excluding the caller) + + + + Rethrows an exception while preserving its stack trace (throw statement typically clobbers existing stack traces) + The exception to rethrow + + + + Tells you if the current runtime is based on Mono + True if we are running under Mono, false otherwise (.NET) + + + + Throws a missing member runtime exception + The type that is involved + A list of names + + + + Gets default value for a specific type + The class/type + The default value + + + + Creates an (possibly uninitialized) instance of a given type + The class/type + The new instance + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + A copy of the original object but of type T + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + [out] The copy of the original object + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + + + + Makes a deep copy of any object + The original object + The type of the instance that should be created + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + The copy of the original object + + + + Tests if a type is a struct + The type + True if the type is a struct + + + + Tests if a type is a class + The type + True if the type is a class + + + + Tests if a type is a value type + The type + True if the type is a value type + + + + Tests if a type is an integer type + The type + True if the type represents some integer + + + + Tests if a type is a floating point type + The type + True if the type represents some floating point + + + + Tests if a type is a numerical type + The type + True if the type represents some number + + + + Tests if a type is void + The type + True if the type is void + + + + Test whether an instance is of a nullable type + Type of instance + An instance to test + True if instance is of nullable type, false if not + + + + Calculates a combined hash code for an enumeration of objects + The objects + The hash code + + + + General extensions for common cases + + + + Joins an enumeration with a value converter and a delimiter to a string + The inner type of the enumeration + The enumeration + An optional value converter (from T to string) + An optional delimiter + The values joined into a string + + + + Converts an array of types (for example methods arguments) into a human readable form + The array of types + A human readable description including brackets + + + + A full description of a type + The type + A human readable description + + + + A a full description of a method or a constructor without assembly details but with generics + The method/constructor + A human readable description + + + + A helper converting parameter infos to types + The array of parameter infos + An array of types + + + + A helper to access a value via key from a dictionary + The key type + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist + + + + A helper to access a value via key from a dictionary with extra casting + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist or cannot be cast to T + + + + Escapes Unicode and ASCII non printable characters + The string to convert + The string to convert + A string literal surrounded by + + + + Extensions for + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand has the same type and is equal to the value + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand is equal to the value + This is an optimized version of for + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand has the same type and is equal to the given operand + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand is equal to the given operand + This is an optimized version of for + + + + Tests for any form of Ldarg* + The + The (optional) index + True if it matches one of the variations + + + + Tests for Ldarga/Ldarga_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for Starg/Starg_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for any form of Ldloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests for any form of Stloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests if the code instruction branches + The + The label if the instruction is a branch operation or if not + True if the instruction branches + + + + Tests if the code instruction calls the method/constructor + The + The method + True if the instruction calls the method or constructor + + + + Tests if the code instruction loads a constant + The + True if the instruction loads a constant + + + + Tests if the code instruction loads an integer constant + The + The integer constant + True if the instruction loads the constant + + + + Tests if the code instruction loads a floating point constant + The + The floating point constant + True if the instruction loads the constant + + + + Tests if the code instruction loads an enum constant + The + The enum + True if the instruction loads the constant + + + + Tests if the code instruction loads a field + The + The field + Set to true if the address of the field is loaded + True if the instruction loads the field + + + + Tests if the code instruction stores a field + The + The field + True if the instruction stores this field + + + + General extensions for collections + + + + A simple way to execute code for every element in a collection + The inner type of the collection + The collection + The action to execute + + + + A simple way to execute code for elements in a collection matching a condition + The inner type of the collection + The collection + The predicate + The action to execute + + + + A helper to add an item to a collection + The inner type of the collection + The collection + The item to add + The collection containing the item + + + + A helper to add an item to an array + The inner type of the collection + The array + The item to add + The array containing the item + + + + A helper to add items to an array + The inner type of the collection + The array + The items to add + The array containing the items + + + + A file log for debugging + + + + Full pathname of the log file, defaults to a file called harmony.log.txt on your Desktop + + + + The indent character. The default is tab + + + + The current indent level + + + + Changes the indentation level + The value to add to the indentation level + + + + Log a string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + The string to log + + + + Logs a list of string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + A list of strings to log (they will not be re-indented) + + + + Returns the log buffer and optionally empties it + True to empty the buffer + The buffer. + + + + Replaces the buffer with new lines + The lines to store + + + + Flushes the log buffer to disk (use in combination with LogBuffered) + + + + Log a string directly to disk. Slower method that prevents missing information in case of a crash + The string to log. + + + + Resets and deletes the log + + + + Logs some bytes as hex values + The pointer to some memory + The length of bytes to log + + + + A helper class to retrieve reflection info for non-private methods + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The generic result type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + A reflection helper to read and write private elements + The result type defined by GetValue() + + + + Creates a traverse instance from an existing instance + The existing instance + + + + Gets/Sets the current value + The value to read or write + + + + A reflection helper to read and write private elements + + + + Creates a new traverse instance from a class/type + The class/type + A instance + + + + Creates a new traverse instance from a class T + The class + A instance + + + + Creates a new traverse instance from an instance + The object + A instance + + + + Creates a new traverse instance from a named type + The type name, for format see + A instance + + + + Creates a new and empty traverse instance + + + + Creates a new traverse instance from a class/type + The class/type + + + + Creates a new traverse instance from an instance + The object + + + + Gets the current value + The value + + + + Gets the current value + The type of the value + The value + + + + Invokes the current method with arguments and returns the result + The method arguments + The value returned by the method + + + + Invokes the current method with arguments and returns the result + The type of the value + The method arguments + The value returned by the method + + + + Sets a value of the current field or property + The value + The same traverse instance + + + + Gets the type of the current field or property + The type + + + + Moves the current traverse instance to a inner type + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type of the field + The type name + A traverse instance + + + + Gets all fields of the current type + A list of field names + + + + Moves the current traverse instance to a property + The type name + Optional property index + A traverse instance + + + + Moves the current traverse instance to a field + The type of the property + The type name + Optional property index + A traverse instance + + + + Gets all properties of the current type + A list of property names + + + + Moves the current traverse instance to a method + The name of the method + The arguments defining the argument types of the method overload + A traverse instance + + + + Moves the current traverse instance to a method + The name of the method + The argument types of the method + The arguments for the method + A traverse instance + + + + Gets all methods of the current type + A list of method names + + + + Checks if the current traverse instance is for a field + True if its a field + + + + Checks if the current traverse instance is for a property + True if its a property + + + + Checks if the current traverse instance is for a method + True if its a method + + + + Checks if the current traverse instance is for a type + True if its a type + + + + Iterates over all fields of the current type and executes a traverse action + Original object + The action receiving a instance for each field + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each field pair + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the field pair and the instances + + + + Iterates over all properties of the current type and executes a traverse action + Original object + The action receiving a instance for each property + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each property pair + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the property pair and the instances + + + + A default field action that copies fields to fields + + + + Returns a string that represents the current traverse + A string representation + + + + diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.0/0Harmony.dll b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.0/0Harmony.dll new file mode 100644 index 0000000..4d9e11f Binary files /dev/null and b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.0/0Harmony.dll differ diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.0/0Harmony.xml b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.0/0Harmony.xml new file mode 100644 index 0000000..a17cc8f --- /dev/null +++ b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.0/0Harmony.xml @@ -0,0 +1,2476 @@ + + + + 0Harmony + + + + A factory to create delegate types + + + Default constructor + + + Creates a delegate type for a method + The method + The new delegate type + + + + A getter delegate type + Type that getter gets field/property value from + Type of the value that getter gets + The instance get getter uses + An delegate + + + + A setter delegate type + Type that setter sets field/property value for + Type of the value that setter sets + The instance the setter uses + The value the setter uses + An delegate + + + + A constructor delegate type + Type that constructor creates + An delegate + + + + A helper class for fast access to getters and setters + + + Creates an instantiation delegate + Type that constructor creates + The new instantiation delegate + + + + Creates an getter delegate for a property + Type that getter reads property from + Type of the property that gets accessed + The property + The new getter delegate + + + + Creates an getter delegate for a field + Type that getter reads field from + Type of the field that gets accessed + The field + The new getter delegate + + + + Creates an getter delegate for a field (with a list of possible field names) + Type that getter reads field/property from + Type of the field/property that gets accessed + A list of possible field names + The new getter delegate + + + + Creates an setter delegate + Type that setter assigns property value to + Type of the property that gets assigned + The property + The new setter delegate + + + + Creates an setter delegate for a field + Type that setter assigns field value to + Type of the field that gets assigned + The field + The new getter delegate + + + + A delegate to invoke a method + The instance + The method parameters + The method result + + + A helper class to invoke method with delegates + + + Creates a fast invocation handler from a method + The method to invoke + Controls if boxed value object is accessed/updated directly + The + + + The directBoxValueAccess option controls how value types passed by reference (e.g. ref int, out my_struct) are handled in the arguments array + passed to the fast invocation handler. + Since the arguments array is an object array, any value types contained within it are actually references to a boxed value object. + Like any other object, there can be other references to such boxed value objects, other than the reference within the arguments array. + For example, + + var val = 5; + var box = (object)val; + var arr = new object[] { box }; + handler(arr); // for a method with parameter signature: ref/out/in int + + + + + If directBoxValueAccess is true, the boxed value object is accessed (and potentially updated) directly when the handler is called, + such that all references to the boxed object reflect the potentially updated value. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, both box and arr[0] + now reflect the value 10. Note that the original val is not updated, since boxing always copies the value into the new boxed value object. + + + If directBoxValueAccess is false (default), the boxed value object in the arguments array is replaced with a "reboxed" value object, + such that potential updates to the value are reflected only in the arguments array. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, only arr[0] now reflects the value 10. + + + + + A low level memory helper + + + Mark method for no inlining (currently only works on Mono) + The method/constructor to change + + + Detours a method + The original method/constructor + The replacement method/constructor + An error string + + + + Writes a jump to memory + The memory address + Jump destination + An error string + + + + Gets the start of a method in memory + The method/constructor + [out] Details of the exception + The method start address + + + + special parameter names that can be used in prefix and postfix methods + + + Patch function helpers + + + Adds a prefix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a prefix + The patch info + The owner (Harmony ID) + + + + Adds a postfix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a postfix + The patch info + The owner (Harmony ID) + + + + Adds a transpiler + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a transpiler + The patch info + The owner (Harmony ID) + + + + Adds a finalizer + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a finalizer + The patch info + The owner (Harmony ID) + + + + Removes a patch method + The patch info + The patch method + + + + Gets sorted patch methods + The original method + Patches to sort + Use debug mode + The sorted patch methods + + + + Creates new replacement method with the latest patches and detours the original method + The original method + Information describing the patches + The newly created replacement method + + + + Creates a patch sorter + Array of patches that will be sorted + Use debugging + + + Sorts internal PatchSortingWrapper collection and caches the results. + After first run the result is provided from the cache. + The original method + The sorted patch methods + + + Checks if the sorter was created with the same patch list and as a result can be reused to + get the sorted order of the patches. + List of patches to check against + true if equal + + + Removes one unresolved dependency from the least important patch. + + + Outputs all unblocked patches from the waiting list to results list + + + Adds patch to both results list and handled patches set + Patch to add + + + Wrapper used over the Patch object to allow faster dependency access and + dependency removal in case of cyclic dependencies + + + Create patch wrapper object used for sorting + Patch to wrap + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + Determines whether patches are equal + The other patch + true if equal + + + Hash function + A hash code + + + Bidirectionally registers Patches as after dependencies + List of dependencies to register + + + Bidirectionally registers Patches as before dependencies + List of dependencies to register + + + Bidirectionally removes Patch from after dependencies + Patch to remove + + + Bidirectionally removes Patch from before dependencies + Patch to remove + + + Specifies the type of method + + + + This is a normal method + + + This is a getter + + + This is a setter + + + This is a constructor + + + This is a static constructor + + + Specifies the type of argument + + + + This is a normal argument + + + This is a reference argument (ref) + + + This is an out argument (out) + + + This is a pointer argument (&) + + + Specifies the type of patch + + + + Any patch + + + A prefix patch + + + A postfix patch + + + A transpiler + + + A finalizer + + + A reverse patch + + + Specifies the type of reverse patch + + + + Use the unmodified original method (directly from IL) + + + Use the original as it is right now including previous patches but excluding future ones + + + The base class for all Harmony annotations (not meant to be used directly) + + + + The common information for all attributes + + + Annotation to define your Harmony patch methods + + + + An empty annotation can be used together with TargetMethod(s) + + + + An annotation that specifies a class to patch + The declaring class/type + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The argument types of the method or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + Annotation to define your standin methods for reverse patching + + + + An annotation that specifies the type of reverse patching + The of the reverse patch + + + + A Harmony annotation to define that all methods in a class are to be patched + + + + A Harmony annotation + + + + A Harmony annotation to define patch priority + The priority + + + + A Harmony annotation + + + + A Harmony annotation to define that a patch comes before another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to define that a patch comes after another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to debug a patch (output uses to log to your Desktop) + + + + Specifies the Prepare function in a patch class + + + + Specifies the Cleanup function in a patch class + + + + Specifies the TargetMethod function in a patch class + + + + Specifies the TargetMethods function in a patch class + + + + Specifies the Prefix function in a patch class + + + + Specifies the Postfix function in a patch class + + + + Specifies the Transpiler function in a patch class + + + + Specifies the Finalizer function in a patch class + + + + A Harmony annotation + + + + The name of the original argument + + + + The index of the original argument + + + + The new name of the original argument + + + + An annotation to declare injected arguments by name + + + + An annotation to declare injected arguments by index + Zero-based index + + + + An annotation to declare injected arguments by renaming them + Name of the original argument + New name + + + + An annotation to declare injected arguments by index and renaming them + Zero-based index + New name + + + + An abstract wrapper around OpCode and their operands. Used by transpilers + + + + The opcode + + + + The operand + + + + All labels defined on this instruction + + + + All exception block boundaries defined on this instruction + + + + Creates a new CodeInstruction with a given opcode and optional operand + The opcode + The operand + + + + Create a full copy (including labels and exception blocks) of a CodeInstruction + The to copy + + + + Clones a CodeInstruction and resets its labels and exception blocks + A lightweight copy of this code instruction + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its opcode + The opcode + A copy of this CodeInstruction with a new opcode + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its operand + The operand + A copy of this CodeInstruction with a new operand + + + + Returns a string representation of the code instruction + A string representation of the code instruction + + + + Exception block types + + + + The beginning of an exception block + + + + The beginning of a catch block + + + + The beginning of an except filter block + + + + The beginning of a fault block + + + + The beginning of a finally block + + + + The end of an exception block + + + + An exception block + + + + Block type + + + + Catch type + + + + Creates an exception block + The + The catch type + + + + The Harmony instance is the main entry to Harmony. After creating one with an unique identifier, it is used to patch and query the current application domain + + + + The unique identifier + + + + Set to true before instantiating Harmony to debug Harmony or use an environment variable to set HARMONY_DEBUG to '1' like this: cmd /C "set HARMONY_DEBUG=1 && game.exe" + This is for full debugging. To debug only specific patches, use the attribute + + + + Creates a new Harmony instance + A unique identifier (you choose your own) + A Harmony instance + + + + Searches the current assembly for Harmony annotations and uses them to create patches + + + + Creates a empty patch processor for an original method + The original method/constructor + A new instance + + + + Creates a patch class processor from an annotated class + The class/type + A new instance + + + + Creates a reverse patcher for one of your stub methods + The original method/constructor + The stand-in stub method as + A new instance + + + + Searches an assembly for Harmony annotations and uses them to create patches + The assembly + + + + Creates patches by manually specifying the methods + The original method/constructor + An optional prefix method wrapped in a object + An optional postfix method wrapped in a object + An optional transpiler method wrapped in a object + An optional finalizer method wrapped in a object + The replacement method that was created to patch the original method + + + + Patches a foreign method onto a stub method of yours and optionally applies transpilers during the process + The original method/constructor you want to duplicate + Your stub method as that will become the original. Needs to have the correct signature (either original or whatever your transpilers generates) + An optional transpiler as method that will be applied during the process + The replacement method that was created to patch the stub method + + + + Unpatches methods + The optional Harmony ID to restrict unpatching to a specific instance + This method could be static if it wasn't for the fact that unpatching creates a new replacement method that contains your harmony ID + + + + Unpatches a method + The original method/constructor + The + The optional Harmony ID to restrict unpatching to a specific instance + + + + Unpatches a method + The original method/constructor + The patch method as method to remove + + + + Test for patches from a specific Harmony ID + The Harmony ID + True if patches for this ID exist + + + + Gets patch information for a given original method + The original method/constructor + The patch information as + + + + Gets the methods this instance has patched + An enumeration of original methods/constructors + + + + Gets all patched original methods in the appdomain + An enumeration of patched original methods/constructors + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly versions keyed by Harmony IDs + + + + Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure + + + + Default serialization constructor (not implemented) + The info + The context + + + + Get a list of IL instructions in pairs of offset+code + A list of key/value pairs which represent an offset and the code at that offset + + + + Get a list of IL instructions without offsets + A list of + + + + Get the error offset of the errornous IL instruction + The offset + + + + Get the index of the errornous IL instruction + The index into the list of instructions or -1 if not found + + + + A wrapper around a method to use it as a patch (for example a Prefix) + + + + The original method + + + + Class/type declaring this patch + + + + Patch method name + + + + Optional patch + + + + Array of argument types of the patch method + + + + of the patch + + + + Install this patch before patches with these Harmony IDs + + + + Install this patch after patches with these Harmony IDs + + + + Reverse patch type, see + + + + Create debug output for this patch + + + + Default constructor + + + + Creates a patch from a given method + The original method + + + + Creates a patch from a given method + The original method + The patch + A list of harmony IDs that should come after this patch + A list of harmony IDs that should come before this patch + Set to true to generate debug output + + + + Creates a patch from a given method + The patch class/type + The patch method name + The optional argument types of the patch method (for overloaded methods) + + + + Gets the names of all internal patch info fields + A list of field names + + + + Merges annotations + The list of to merge + The merged + + + + Returns a string that represents the annotation + A string representation + + + + Annotation extensions + + + + Copies annotation information + The source + The destination + + + + Clones an annotation + The to clone + A copied + + + + Merges annotations + The master + The detail + A new, merged + + + + Gets all annotations on a class/type + The class/type + A list of all + + + + Gets merged annotations on a class/type + The class/type + The merged + + + + Gets all annotations on a method + The method/constructor + A list of + + + + Gets merged annotations on a method + The method/constructor + The merged + + + + + A mutable representation of an inline signature, similar to Mono.Cecil's CallSite. + Used by the calli instruction, can be used by transpilers + + + + + See + + + + See + + + + See + + + + The list of all parameter types or function pointer signatures received by the call site + + + + The return type or function pointer signature returned by the call site + + + + Returns a string representation of the inline signature + A string representation of the inline signature + + + + + A mutable representation of a parameter type with an attached type modifier, + similar to Mono.Cecil's OptionalModifierType / RequiredModifierType and C#'s modopt / modreq + + + + + Whether this is a modopt (optional modifier type) or a modreq (required modifier type) + + + + The modifier type attached to the parameter type + + + + The modified parameter type + + + + Returns a string representation of the modifier type + A string representation of the modifier type + + + + Patch serialization + + + + Control the binding of a serialized object to a type + Specifies the assembly name of the serialized object + Specifies the type name of the serialized object + The type of the object the formatter creates a new instance of + + + + Serializes a patch info + The + The serialized data + + + + Deserialize a patch info + The serialized data + A + + + + Compare function to sort patch priorities + The patch + Zero-based index + The priority + A standard sort integer (-1, 0, 1) + + + + Serializable patch information + + + + Prefixes as an array of + + + + Postfixes as an array of + + + + Transpilers as an array of + + + + Finalizers as an array of + + + + Default constructor + + + + Returns if any of the patches wants debugging turned on + + + + Adds a prefix + + The prefix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for prefixes that should run after this prefix + A list of Harmony IDs for prefixes that should run before this prefix + A flag that will log the replacement method via every time this prefix is used to build the replacement, even in the future + + + + Removes prefixes + The owner of the prefix or * for any prefix + + + + Adds a postfix + The postfix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for postfixes that should run after this postfix + A list of Harmony IDs for postfixes that should run before this postfix + A flag that will log the replacement method via every time this postfix is used to build the replacement, even in the future + + + + Removes postfixes + The owner of the postfix or * for any postfix + + + + Adds a transpiler + The transpiler method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for transpilers that should run after this transpiler + A list of Harmony IDs for transpilers that should run before this transpiler + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes transpilers + The owner of the transpiler or * for any transpiler + + + + Adds a finalizer + The finalizer method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for finalizers that should run after this finalizer + A list of Harmony IDs for finalizers that should run before this finalizer + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes finalizers + The owner of the finalizer or * for any finalizer + + + + Removes a patch using its method + The method of the patch to remove + + + + A serializable patch + + + + Zero-based index + + + + The owner (Harmony ID) + + + + The priority, see + + + + Keep this patch before the patches indicated in the list of Harmony IDs + + + + Keep this patch after the patches indicated in the list of Harmony IDs + + + + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + The method of the static patch method + + + + Creates a patch + The method of the patch + Zero-based index + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for patches that should run after this patch + A list of Harmony IDs for patches that should run before this patch + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Get the patch method or a DynamicMethod if original patch method is a patch factory + The original method/constructor + The method of the patch + + + + Determines whether patches are equal + The other patch + true if equal + + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + + Hash function + A hash code + + + + A PatchClassProcessor used to turn on a class/type into patches + + + + Creates an empty patch class processor + The Harmony instance + The class to process + + + + Applies the patches + A list of all created replacement methods or null if patch class is not annotated + + + + A group of patches + + + + A collection of prefix + + + + A collection of postfix + + + + A collection of transpiler + + + + A collection of finalizer + + + + Gets all owners (Harmony IDs) or all known patches + The patch owners + + + + Creates a group of patches + An array of prefixes as + An array of postfixes as + An array of transpileres as + An array of finalizeres as + + + + A PatchProcessor handles patches on a method/constructor + + + + Creates an empty patch processor + The Harmony instance + The original method/constructor + + + + Adds a prefix + The prefix as a + A for chaining calls + + + + Adds a prefix + The prefix method + A for chaining calls + + + + Adds a postfix + The postfix as a + A for chaining calls + + + + Adds a postfix + The postfix method + A for chaining calls + + + + Adds a transpiler + The transpiler as a + A for chaining calls + + + + Adds a transpiler + The transpiler method + A for chaining calls + + + + Adds a finalizer + The finalizer as a + A for chaining calls + + + + Adds a finalizer + The finalizer method + A for chaining calls + + + + Gets all patched original methods in the appdomain + An enumeration of patched method/constructor + + + + Applies all registered patches + The generated replacement method + + + + Unpatches patches of a given type and/or Harmony ID + The patch type + Harmony ID or * for any + A for chaining calls + + + + Unpatches a specific patch + The method of the patch + A for chaining calls + + + + Gets patch information on an original + The original method/constructor + The patch information as + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly version keyed by Harmony ID + + + + Returns the methods unmodified list of code instructions + The original method/constructor + Optionally an existing generator that will be used to create all local variables and labels contained in the result (if not specified, an internal generator is used) + A list containing all the original + + + + Returns the methods unmodified list of code instructions + The original method/constructor + A new generator that now contains all local variables and labels contained in the result + A list containing all the original + + + + A low level way to read the body of a method. Used for quick searching in methods + The original method + All instructions as opcode/operand pairs + + + + A patch priority + + + + Patch last + + + + Patch with very low priority + + + + Patch with low priority + + + + Patch with lower than normal priority + + + + Patch with normal priority + + + + Patch with higher than normal priority + + + + Patch with high priority + + + + Patch with very high priority + + + + Patch first + + + + A reverse patcher + + + + Creates a reverse patcher + The Harmony instance + The original method/constructor + Your stand-in stub method as + + + + Applies the patch + The type of patch, see + The generated replacement method + + + + A collection of commonly used transpilers + + + + A transpiler that replaces all occurrences of a given method with another one + The enumeration of to act on + Method or constructor to search for + Method or constructor to replace with + Modified enumeration of + + + + A transpiler that alters instructions that match a predicate by calling an action + The enumeration of to act on + A predicate selecting the instructions to change + An action to apply to matching instructions + Modified enumeration of + + + + A transpiler that logs a text at the beginning of the method + The instructions to act on + The log text + Modified enumeration of + + + + A helper class for reflection related functions + + + + Shortcut for to simplify the use of reflections and make it work for any access level + + + + Shortcut for to simplify the use of reflections and make it work for any access level but only within the current type + + + + Gets a type by name. Prefers a full name with namespace but falls back to the first type matching the name otherwise + The name + A type or null if not found + + + + Gets all type by name from a given assembly. This is a wrapper that respects different .NET versions + The assembly + An array of types + + + + Applies a function going up the type hierarchy and stops at the first non null result + Result type of func() + The class/type to start with + The evaluation function returning T + Returns the first non null result or default(T) when reaching the top level type object + + + + Applies a function going into inner types and stops at the first non null result + Generic type parameter + The class/type to start with + The evaluation function returning T + Returns the first non null result or null with no match + + + + Gets the reflection information for a directly declared field + The class/type where the field is defined + The name of the field + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field by searching the type and all its super types + The class/type where the field is defined + The name of the field (case sensitive) + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field + The class/type where the field is declared + The zero-based index of the field inside the class definition + A field or null when type is null or when the field cannot be found + + + + Gets the reflection information for a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a property by searching the type and all its super types + The class/type + The name + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a directly declared method + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The full name like Namespace.Type1.Type2:MethodName of the type where the method is declared + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the names of all method that are declared in a type + The declaring class/type + A list of method names + + + + Gets the names of all method that are declared in the type of the instance + An instance of the type to search in + A list of method names + + + + Gets the names of all fields that are declared in a type + The declaring class/type + A list of field names + + + + Gets the names of all fields that are declared in the type of the instance + An instance of the type to search in + A list of field names + + + + Gets the names of all properties that are declared in a type + The declaring class/type + A list of property names + + + + Gets the names of all properties that are declared in the type of the instance + An instance of the type to search in + A list of property names + + + + Gets the type of any class member of + A member + The class/type of this member + + + + Test if a class member is actually an concrete implementation + A member + True if the member is a declared + + + + Gets the real implementation of a class member + A member + The member itself if its declared. Otherwise the member that is actually implemented in some base type + + + + Gets the reflection information for a directly declared constructor + The class/type where the constructor is declared + Optional parameters to target a specific overload of the constructor + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the constructor cannot be found + + + + Gets the reflection information for a constructor by searching the type and all its super types + The class/type where the constructor is declared + Optional parameters to target a specific overload of the method + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the method cannot be found + + + + Gets reflection information for all declared constructors + The class/type where the constructors are declared + Optional parameters to only consider static constructors + A list of constructor infos + + + + Gets reflection information for all declared methods + The class/type where the methods are declared + A list of methods + + + + Gets reflection information for all declared properties + The class/type where the properties are declared + A list of properties + + + + Gets reflection information for all declared fields + The class/type where the fields are declared + A list of fields + + + + Gets the return type of a method or constructor + The method/constructor + The return type + + + + Given a type, returns the first inner type matching a recursive search by name + The class/type to start searching at + The name of the inner type (case sensitive) + The inner type or null if type/name is null or if a type with that name cannot be found + + + + Given a type, returns the first inner type matching a recursive search with a predicate + The class/type to start searching at + The predicate to search with + The inner type or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first method matching a predicate + The class/type to start searching at + The predicate to search with + The method or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first constructor matching a predicate + The class/type to start searching at + The predicate to search with + The constructor info or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first property matching a predicate + The class/type to start searching at + The predicate to search with + The property or null if type/predicate is null or if a type with that name cannot be found + + + + Returns an array containing the type of each object in the given array + An array of objects + An array of types or an empty array if parameters is null (if an object is null, the type for it will be object) + + + + Creates an array of input parameters for a given method and a given set of potential inputs + The method/constructor you are planing to call + The possible input parameters in any order + An object array matching the method signature + + + + A read/writable reference to an instance field + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The runtime instance to access the field (leave empty for static fields) + An readable/assignable object representing the field + + + + Creates an instance field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + A read and writable field reference delegate + + + + Creates an instance field reference for a specific instance + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The instance + The name of the field + An readable/assignable object representing the field + + + + Creates an instance field reference delegate + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The field of the field + A read and writable delegate + + + + A read/writable reference delegate to a static field + The type of the field + An readable/assignable object representing the static field + + + + Creates a static field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + An readable/assignable object representing the static field + + + + Creates a static field reference delegate + The type of the field + The field + A read and writable delegate + + + + Returns who called the current method + The calling method/constructor (excluding the caller) + + + + Rethrows an exception while preserving its stack trace (throw statement typically clobbers existing stack traces) + The exception to rethrow + + + + Tells you if the current runtime is based on Mono + True if we are running under Mono, false otherwise (.NET) + + + + Throws a missing member runtime exception + The type that is involved + A list of names + + + + Gets default value for a specific type + The class/type + The default value + + + + Creates an (possibly uninitialized) instance of a given type + The class/type + The new instance + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + A copy of the original object but of type T + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + [out] The copy of the original object + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + + + + Makes a deep copy of any object + The original object + The type of the instance that should be created + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + The copy of the original object + + + + Tests if a type is a struct + The type + True if the type is a struct + + + + Tests if a type is a class + The type + True if the type is a class + + + + Tests if a type is a value type + The type + True if the type is a value type + + + + Tests if a type is an integer type + The type + True if the type represents some integer + + + + Tests if a type is a floating point type + The type + True if the type represents some floating point + + + + Tests if a type is a numerical type + The type + True if the type represents some number + + + + Tests if a type is void + The type + True if the type is void + + + + Test whether an instance is of a nullable type + Type of instance + An instance to test + True if instance is of nullable type, false if not + + + + Calculates a combined hash code for an enumeration of objects + The objects + The hash code + + + + General extensions for common cases + + + + Joins an enumeration with a value converter and a delimiter to a string + The inner type of the enumeration + The enumeration + An optional value converter (from T to string) + An optional delimiter + The values joined into a string + + + + Converts an array of types (for example methods arguments) into a human readable form + The array of types + A human readable description including brackets + + + + A full description of a type + The type + A human readable description + + + + A a full description of a method or a constructor without assembly details but with generics + The method/constructor + A human readable description + + + + A helper converting parameter infos to types + The array of parameter infos + An array of types + + + + A helper to access a value via key from a dictionary + The key type + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist + + + + A helper to access a value via key from a dictionary with extra casting + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist or cannot be cast to T + + + + Escapes Unicode and ASCII non printable characters + The string to convert + The string to convert + A string literal surrounded by + + + + Extensions for + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand has the same type and is equal to the value + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand is equal to the value + This is an optimized version of for + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand has the same type and is equal to the given operand + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand is equal to the given operand + This is an optimized version of for + + + + Tests for any form of Ldarg* + The + The (optional) index + True if it matches one of the variations + + + + Tests for Ldarga/Ldarga_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for Starg/Starg_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for any form of Ldloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests for any form of Stloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests if the code instruction branches + The + The label if the instruction is a branch operation or if not + True if the instruction branches + + + + Tests if the code instruction calls the method/constructor + The + The method + True if the instruction calls the method or constructor + + + + Tests if the code instruction loads a constant + The + True if the instruction loads a constant + + + + Tests if the code instruction loads an integer constant + The + The integer constant + True if the instruction loads the constant + + + + Tests if the code instruction loads a floating point constant + The + The floating point constant + True if the instruction loads the constant + + + + Tests if the code instruction loads an enum constant + The + The enum + True if the instruction loads the constant + + + + Tests if the code instruction loads a field + The + The field + Set to true if the address of the field is loaded + True if the instruction loads the field + + + + Tests if the code instruction stores a field + The + The field + True if the instruction stores this field + + + + General extensions for collections + + + + A simple way to execute code for every element in a collection + The inner type of the collection + The collection + The action to execute + + + + A simple way to execute code for elements in a collection matching a condition + The inner type of the collection + The collection + The predicate + The action to execute + + + + A helper to add an item to a collection + The inner type of the collection + The collection + The item to add + The collection containing the item + + + + A helper to add an item to an array + The inner type of the collection + The array + The item to add + The array containing the item + + + + A helper to add items to an array + The inner type of the collection + The array + The items to add + The array containing the items + + + + A file log for debugging + + + + Full pathname of the log file, defaults to a file called harmony.log.txt on your Desktop + + + + The indent character. The default is tab + + + + The current indent level + + + + Changes the indentation level + The value to add to the indentation level + + + + Log a string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + The string to log + + + + Logs a list of string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + A list of strings to log (they will not be re-indented) + + + + Returns the log buffer and optionally empties it + True to empty the buffer + The buffer. + + + + Replaces the buffer with new lines + The lines to store + + + + Flushes the log buffer to disk (use in combination with LogBuffered) + + + + Log a string directly to disk. Slower method that prevents missing information in case of a crash + The string to log. + + + + Resets and deletes the log + + + + Logs some bytes as hex values + The pointer to some memory + The length of bytes to log + + + + A helper class to retrieve reflection info for non-private methods + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The generic result type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + A reflection helper to read and write private elements + The result type defined by GetValue() + + + + Creates a traverse instance from an existing instance + The existing instance + + + + Gets/Sets the current value + The value to read or write + + + + A reflection helper to read and write private elements + + + + Creates a new traverse instance from a class/type + The class/type + A instance + + + + Creates a new traverse instance from a class T + The class + A instance + + + + Creates a new traverse instance from an instance + The object + A instance + + + + Creates a new traverse instance from a named type + The type name, for format see + A instance + + + + Creates a new and empty traverse instance + + + + Creates a new traverse instance from a class/type + The class/type + + + + Creates a new traverse instance from an instance + The object + + + + Gets the current value + The value + + + + Gets the current value + The type of the value + The value + + + + Invokes the current method with arguments and returns the result + The method arguments + The value returned by the method + + + + Invokes the current method with arguments and returns the result + The type of the value + The method arguments + The value returned by the method + + + + Sets a value of the current field or property + The value + The same traverse instance + + + + Gets the type of the current field or property + The type + + + + Moves the current traverse instance to a inner type + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type of the field + The type name + A traverse instance + + + + Gets all fields of the current type + A list of field names + + + + Moves the current traverse instance to a property + The type name + Optional property index + A traverse instance + + + + Moves the current traverse instance to a field + The type of the property + The type name + Optional property index + A traverse instance + + + + Gets all properties of the current type + A list of property names + + + + Moves the current traverse instance to a method + The name of the method + The arguments defining the argument types of the method overload + A traverse instance + + + + Moves the current traverse instance to a method + The name of the method + The argument types of the method + The arguments for the method + A traverse instance + + + + Gets all methods of the current type + A list of method names + + + + Checks if the current traverse instance is for a field + True if its a field + + + + Checks if the current traverse instance is for a property + True if its a property + + + + Checks if the current traverse instance is for a method + True if its a method + + + + Checks if the current traverse instance is for a type + True if its a type + + + + Iterates over all fields of the current type and executes a traverse action + Original object + The action receiving a instance for each field + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each field pair + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the field pair and the instances + + + + Iterates over all properties of the current type and executes a traverse action + Original object + The action receiving a instance for each property + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each property pair + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the property pair and the instances + + + + A default field action that copies fields to fields + + + + Returns a string that represents the current traverse + A string representation + + + + diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.1/0Harmony.dll b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.1/0Harmony.dll new file mode 100644 index 0000000..74f69df Binary files /dev/null and b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.1/0Harmony.dll differ diff --git a/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.1/0Harmony.xml b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.1/0Harmony.xml new file mode 100644 index 0000000..a17cc8f --- /dev/null +++ b/1.4/Source/DualWield/packages/Lib.Harmony.2.0.0.7/lib/netcoreapp3.1/0Harmony.xml @@ -0,0 +1,2476 @@ + + + + 0Harmony + + + + A factory to create delegate types + + + Default constructor + + + Creates a delegate type for a method + The method + The new delegate type + + + + A getter delegate type + Type that getter gets field/property value from + Type of the value that getter gets + The instance get getter uses + An delegate + + + + A setter delegate type + Type that setter sets field/property value for + Type of the value that setter sets + The instance the setter uses + The value the setter uses + An delegate + + + + A constructor delegate type + Type that constructor creates + An delegate + + + + A helper class for fast access to getters and setters + + + Creates an instantiation delegate + Type that constructor creates + The new instantiation delegate + + + + Creates an getter delegate for a property + Type that getter reads property from + Type of the property that gets accessed + The property + The new getter delegate + + + + Creates an getter delegate for a field + Type that getter reads field from + Type of the field that gets accessed + The field + The new getter delegate + + + + Creates an getter delegate for a field (with a list of possible field names) + Type that getter reads field/property from + Type of the field/property that gets accessed + A list of possible field names + The new getter delegate + + + + Creates an setter delegate + Type that setter assigns property value to + Type of the property that gets assigned + The property + The new setter delegate + + + + Creates an setter delegate for a field + Type that setter assigns field value to + Type of the field that gets assigned + The field + The new getter delegate + + + + A delegate to invoke a method + The instance + The method parameters + The method result + + + A helper class to invoke method with delegates + + + Creates a fast invocation handler from a method + The method to invoke + Controls if boxed value object is accessed/updated directly + The + + + The directBoxValueAccess option controls how value types passed by reference (e.g. ref int, out my_struct) are handled in the arguments array + passed to the fast invocation handler. + Since the arguments array is an object array, any value types contained within it are actually references to a boxed value object. + Like any other object, there can be other references to such boxed value objects, other than the reference within the arguments array. + For example, + + var val = 5; + var box = (object)val; + var arr = new object[] { box }; + handler(arr); // for a method with parameter signature: ref/out/in int + + + + + If directBoxValueAccess is true, the boxed value object is accessed (and potentially updated) directly when the handler is called, + such that all references to the boxed object reflect the potentially updated value. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, both box and arr[0] + now reflect the value 10. Note that the original val is not updated, since boxing always copies the value into the new boxed value object. + + + If directBoxValueAccess is false (default), the boxed value object in the arguments array is replaced with a "reboxed" value object, + such that potential updates to the value are reflected only in the arguments array. + In the above example, if the method associated with the handler updates the passed (boxed) value to 10, only arr[0] now reflects the value 10. + + + + + A low level memory helper + + + Mark method for no inlining (currently only works on Mono) + The method/constructor to change + + + Detours a method + The original method/constructor + The replacement method/constructor + An error string + + + + Writes a jump to memory + The memory address + Jump destination + An error string + + + + Gets the start of a method in memory + The method/constructor + [out] Details of the exception + The method start address + + + + special parameter names that can be used in prefix and postfix methods + + + Patch function helpers + + + Adds a prefix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a prefix + The patch info + The owner (Harmony ID) + + + + Adds a postfix + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a postfix + The patch info + The owner (Harmony ID) + + + + Adds a transpiler + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a transpiler + The patch info + The owner (Harmony ID) + + + + Adds a finalizer + The patch info + The owner (Harmony ID) + The annotation info + + + + Removes a finalizer + The patch info + The owner (Harmony ID) + + + + Removes a patch method + The patch info + The patch method + + + + Gets sorted patch methods + The original method + Patches to sort + Use debug mode + The sorted patch methods + + + + Creates new replacement method with the latest patches and detours the original method + The original method + Information describing the patches + The newly created replacement method + + + + Creates a patch sorter + Array of patches that will be sorted + Use debugging + + + Sorts internal PatchSortingWrapper collection and caches the results. + After first run the result is provided from the cache. + The original method + The sorted patch methods + + + Checks if the sorter was created with the same patch list and as a result can be reused to + get the sorted order of the patches. + List of patches to check against + true if equal + + + Removes one unresolved dependency from the least important patch. + + + Outputs all unblocked patches from the waiting list to results list + + + Adds patch to both results list and handled patches set + Patch to add + + + Wrapper used over the Patch object to allow faster dependency access and + dependency removal in case of cyclic dependencies + + + Create patch wrapper object used for sorting + Patch to wrap + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + Determines whether patches are equal + The other patch + true if equal + + + Hash function + A hash code + + + Bidirectionally registers Patches as after dependencies + List of dependencies to register + + + Bidirectionally registers Patches as before dependencies + List of dependencies to register + + + Bidirectionally removes Patch from after dependencies + Patch to remove + + + Bidirectionally removes Patch from before dependencies + Patch to remove + + + Specifies the type of method + + + + This is a normal method + + + This is a getter + + + This is a setter + + + This is a constructor + + + This is a static constructor + + + Specifies the type of argument + + + + This is a normal argument + + + This is a reference argument (ref) + + + This is an out argument (out) + + + This is a pointer argument (&) + + + Specifies the type of patch + + + + Any patch + + + A prefix patch + + + A postfix patch + + + A transpiler + + + A finalizer + + + A reverse patch + + + Specifies the type of reverse patch + + + + Use the unmodified original method (directly from IL) + + + Use the original as it is right now including previous patches but excluding future ones + + + The base class for all Harmony annotations (not meant to be used directly) + + + + The common information for all attributes + + + Annotation to define your Harmony patch methods + + + + An empty annotation can be used together with TargetMethod(s) + + + + An annotation that specifies a class to patch + The declaring class/type + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The argument types of the method or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The + An array of argument types to target overloads + Array of + + + + An annotation that specifies a method, property or constructor to patch + The declaring class/type + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + The name of the method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + The + An array of argument types to target overloads + An array of + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + + + + An annotation that specifies a method, property or constructor to patch + An array of argument types to target overloads + An array of + + + + Annotation to define your standin methods for reverse patching + + + + An annotation that specifies the type of reverse patching + The of the reverse patch + + + + A Harmony annotation to define that all methods in a class are to be patched + + + + A Harmony annotation + + + + A Harmony annotation to define patch priority + The priority + + + + A Harmony annotation + + + + A Harmony annotation to define that a patch comes before another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to define that a patch comes after another patch + The array of harmony IDs of the other patches + + + + A Harmony annotation + + + A Harmony annotation to debug a patch (output uses to log to your Desktop) + + + + Specifies the Prepare function in a patch class + + + + Specifies the Cleanup function in a patch class + + + + Specifies the TargetMethod function in a patch class + + + + Specifies the TargetMethods function in a patch class + + + + Specifies the Prefix function in a patch class + + + + Specifies the Postfix function in a patch class + + + + Specifies the Transpiler function in a patch class + + + + Specifies the Finalizer function in a patch class + + + + A Harmony annotation + + + + The name of the original argument + + + + The index of the original argument + + + + The new name of the original argument + + + + An annotation to declare injected arguments by name + + + + An annotation to declare injected arguments by index + Zero-based index + + + + An annotation to declare injected arguments by renaming them + Name of the original argument + New name + + + + An annotation to declare injected arguments by index and renaming them + Zero-based index + New name + + + + An abstract wrapper around OpCode and their operands. Used by transpilers + + + + The opcode + + + + The operand + + + + All labels defined on this instruction + + + + All exception block boundaries defined on this instruction + + + + Creates a new CodeInstruction with a given opcode and optional operand + The opcode + The operand + + + + Create a full copy (including labels and exception blocks) of a CodeInstruction + The to copy + + + + Clones a CodeInstruction and resets its labels and exception blocks + A lightweight copy of this code instruction + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its opcode + The opcode + A copy of this CodeInstruction with a new opcode + + + + Clones a CodeInstruction, resets labels and exception blocks and sets its operand + The operand + A copy of this CodeInstruction with a new operand + + + + Returns a string representation of the code instruction + A string representation of the code instruction + + + + Exception block types + + + + The beginning of an exception block + + + + The beginning of a catch block + + + + The beginning of an except filter block + + + + The beginning of a fault block + + + + The beginning of a finally block + + + + The end of an exception block + + + + An exception block + + + + Block type + + + + Catch type + + + + Creates an exception block + The + The catch type + + + + The Harmony instance is the main entry to Harmony. After creating one with an unique identifier, it is used to patch and query the current application domain + + + + The unique identifier + + + + Set to true before instantiating Harmony to debug Harmony or use an environment variable to set HARMONY_DEBUG to '1' like this: cmd /C "set HARMONY_DEBUG=1 && game.exe" + This is for full debugging. To debug only specific patches, use the attribute + + + + Creates a new Harmony instance + A unique identifier (you choose your own) + A Harmony instance + + + + Searches the current assembly for Harmony annotations and uses them to create patches + + + + Creates a empty patch processor for an original method + The original method/constructor + A new instance + + + + Creates a patch class processor from an annotated class + The class/type + A new instance + + + + Creates a reverse patcher for one of your stub methods + The original method/constructor + The stand-in stub method as + A new instance + + + + Searches an assembly for Harmony annotations and uses them to create patches + The assembly + + + + Creates patches by manually specifying the methods + The original method/constructor + An optional prefix method wrapped in a object + An optional postfix method wrapped in a object + An optional transpiler method wrapped in a object + An optional finalizer method wrapped in a object + The replacement method that was created to patch the original method + + + + Patches a foreign method onto a stub method of yours and optionally applies transpilers during the process + The original method/constructor you want to duplicate + Your stub method as that will become the original. Needs to have the correct signature (either original or whatever your transpilers generates) + An optional transpiler as method that will be applied during the process + The replacement method that was created to patch the stub method + + + + Unpatches methods + The optional Harmony ID to restrict unpatching to a specific instance + This method could be static if it wasn't for the fact that unpatching creates a new replacement method that contains your harmony ID + + + + Unpatches a method + The original method/constructor + The + The optional Harmony ID to restrict unpatching to a specific instance + + + + Unpatches a method + The original method/constructor + The patch method as method to remove + + + + Test for patches from a specific Harmony ID + The Harmony ID + True if patches for this ID exist + + + + Gets patch information for a given original method + The original method/constructor + The patch information as + + + + Gets the methods this instance has patched + An enumeration of original methods/constructors + + + + Gets all patched original methods in the appdomain + An enumeration of patched original methods/constructors + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly versions keyed by Harmony IDs + + + + Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure + + + + Default serialization constructor (not implemented) + The info + The context + + + + Get a list of IL instructions in pairs of offset+code + A list of key/value pairs which represent an offset and the code at that offset + + + + Get a list of IL instructions without offsets + A list of + + + + Get the error offset of the errornous IL instruction + The offset + + + + Get the index of the errornous IL instruction + The index into the list of instructions or -1 if not found + + + + A wrapper around a method to use it as a patch (for example a Prefix) + + + + The original method + + + + Class/type declaring this patch + + + + Patch method name + + + + Optional patch + + + + Array of argument types of the patch method + + + + of the patch + + + + Install this patch before patches with these Harmony IDs + + + + Install this patch after patches with these Harmony IDs + + + + Reverse patch type, see + + + + Create debug output for this patch + + + + Default constructor + + + + Creates a patch from a given method + The original method + + + + Creates a patch from a given method + The original method + The patch + A list of harmony IDs that should come after this patch + A list of harmony IDs that should come before this patch + Set to true to generate debug output + + + + Creates a patch from a given method + The patch class/type + The patch method name + The optional argument types of the patch method (for overloaded methods) + + + + Gets the names of all internal patch info fields + A list of field names + + + + Merges annotations + The list of to merge + The merged + + + + Returns a string that represents the annotation + A string representation + + + + Annotation extensions + + + + Copies annotation information + The source + The destination + + + + Clones an annotation + The to clone + A copied + + + + Merges annotations + The master + The detail + A new, merged + + + + Gets all annotations on a class/type + The class/type + A list of all + + + + Gets merged annotations on a class/type + The class/type + The merged + + + + Gets all annotations on a method + The method/constructor + A list of + + + + Gets merged annotations on a method + The method/constructor + The merged + + + + + A mutable representation of an inline signature, similar to Mono.Cecil's CallSite. + Used by the calli instruction, can be used by transpilers + + + + + See + + + + See + + + + See + + + + The list of all parameter types or function pointer signatures received by the call site + + + + The return type or function pointer signature returned by the call site + + + + Returns a string representation of the inline signature + A string representation of the inline signature + + + + + A mutable representation of a parameter type with an attached type modifier, + similar to Mono.Cecil's OptionalModifierType / RequiredModifierType and C#'s modopt / modreq + + + + + Whether this is a modopt (optional modifier type) or a modreq (required modifier type) + + + + The modifier type attached to the parameter type + + + + The modified parameter type + + + + Returns a string representation of the modifier type + A string representation of the modifier type + + + + Patch serialization + + + + Control the binding of a serialized object to a type + Specifies the assembly name of the serialized object + Specifies the type name of the serialized object + The type of the object the formatter creates a new instance of + + + + Serializes a patch info + The + The serialized data + + + + Deserialize a patch info + The serialized data + A + + + + Compare function to sort patch priorities + The patch + Zero-based index + The priority + A standard sort integer (-1, 0, 1) + + + + Serializable patch information + + + + Prefixes as an array of + + + + Postfixes as an array of + + + + Transpilers as an array of + + + + Finalizers as an array of + + + + Default constructor + + + + Returns if any of the patches wants debugging turned on + + + + Adds a prefix + + The prefix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for prefixes that should run after this prefix + A list of Harmony IDs for prefixes that should run before this prefix + A flag that will log the replacement method via every time this prefix is used to build the replacement, even in the future + + + + Removes prefixes + The owner of the prefix or * for any prefix + + + + Adds a postfix + The postfix method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for postfixes that should run after this postfix + A list of Harmony IDs for postfixes that should run before this postfix + A flag that will log the replacement method via every time this postfix is used to build the replacement, even in the future + + + + Removes postfixes + The owner of the postfix or * for any postfix + + + + Adds a transpiler + The transpiler method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for transpilers that should run after this transpiler + A list of Harmony IDs for transpilers that should run before this transpiler + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes transpilers + The owner of the transpiler or * for any transpiler + + + + Adds a finalizer + The finalizer method + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for finalizers that should run after this finalizer + A list of Harmony IDs for finalizers that should run before this finalizer + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Removes finalizers + The owner of the finalizer or * for any finalizer + + + + Removes a patch using its method + The method of the patch to remove + + + + A serializable patch + + + + Zero-based index + + + + The owner (Harmony ID) + + + + The priority, see + + + + Keep this patch before the patches indicated in the list of Harmony IDs + + + + Keep this patch after the patches indicated in the list of Harmony IDs + + + + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + The method of the static patch method + + + + Creates a patch + The method of the patch + Zero-based index + An owner (Harmony ID) + The priority, see + A list of Harmony IDs for patches that should run after this patch + A list of Harmony IDs for patches that should run before this patch + A flag that will log the replacement method via every time this patch is used to build the replacement, even in the future + + + + Get the patch method or a DynamicMethod if original patch method is a patch factory + The original method/constructor + The method of the patch + + + + Determines whether patches are equal + The other patch + true if equal + + + + Determines how patches sort + The other patch + integer to define sort order (-1, 0, 1) + + + + Hash function + A hash code + + + + A PatchClassProcessor used to turn on a class/type into patches + + + + Creates an empty patch class processor + The Harmony instance + The class to process + + + + Applies the patches + A list of all created replacement methods or null if patch class is not annotated + + + + A group of patches + + + + A collection of prefix + + + + A collection of postfix + + + + A collection of transpiler + + + + A collection of finalizer + + + + Gets all owners (Harmony IDs) or all known patches + The patch owners + + + + Creates a group of patches + An array of prefixes as + An array of postfixes as + An array of transpileres as + An array of finalizeres as + + + + A PatchProcessor handles patches on a method/constructor + + + + Creates an empty patch processor + The Harmony instance + The original method/constructor + + + + Adds a prefix + The prefix as a + A for chaining calls + + + + Adds a prefix + The prefix method + A for chaining calls + + + + Adds a postfix + The postfix as a + A for chaining calls + + + + Adds a postfix + The postfix method + A for chaining calls + + + + Adds a transpiler + The transpiler as a + A for chaining calls + + + + Adds a transpiler + The transpiler method + A for chaining calls + + + + Adds a finalizer + The finalizer as a + A for chaining calls + + + + Adds a finalizer + The finalizer method + A for chaining calls + + + + Gets all patched original methods in the appdomain + An enumeration of patched method/constructor + + + + Applies all registered patches + The generated replacement method + + + + Unpatches patches of a given type and/or Harmony ID + The patch type + Harmony ID or * for any + A for chaining calls + + + + Unpatches a specific patch + The method of the patch + A for chaining calls + + + + Gets patch information on an original + The original method/constructor + The patch information as + + + + Gets Harmony version for all active Harmony instances + [out] The current Harmony version + A dictionary containing assembly version keyed by Harmony ID + + + + Returns the methods unmodified list of code instructions + The original method/constructor + Optionally an existing generator that will be used to create all local variables and labels contained in the result (if not specified, an internal generator is used) + A list containing all the original + + + + Returns the methods unmodified list of code instructions + The original method/constructor + A new generator that now contains all local variables and labels contained in the result + A list containing all the original + + + + A low level way to read the body of a method. Used for quick searching in methods + The original method + All instructions as opcode/operand pairs + + + + A patch priority + + + + Patch last + + + + Patch with very low priority + + + + Patch with low priority + + + + Patch with lower than normal priority + + + + Patch with normal priority + + + + Patch with higher than normal priority + + + + Patch with high priority + + + + Patch with very high priority + + + + Patch first + + + + A reverse patcher + + + + Creates a reverse patcher + The Harmony instance + The original method/constructor + Your stand-in stub method as + + + + Applies the patch + The type of patch, see + The generated replacement method + + + + A collection of commonly used transpilers + + + + A transpiler that replaces all occurrences of a given method with another one + The enumeration of to act on + Method or constructor to search for + Method or constructor to replace with + Modified enumeration of + + + + A transpiler that alters instructions that match a predicate by calling an action + The enumeration of to act on + A predicate selecting the instructions to change + An action to apply to matching instructions + Modified enumeration of + + + + A transpiler that logs a text at the beginning of the method + The instructions to act on + The log text + Modified enumeration of + + + + A helper class for reflection related functions + + + + Shortcut for to simplify the use of reflections and make it work for any access level + + + + Shortcut for to simplify the use of reflections and make it work for any access level but only within the current type + + + + Gets a type by name. Prefers a full name with namespace but falls back to the first type matching the name otherwise + The name + A type or null if not found + + + + Gets all type by name from a given assembly. This is a wrapper that respects different .NET versions + The assembly + An array of types + + + + Applies a function going up the type hierarchy and stops at the first non null result + Result type of func() + The class/type to start with + The evaluation function returning T + Returns the first non null result or default(T) when reaching the top level type object + + + + Applies a function going into inner types and stops at the first non null result + Generic type parameter + The class/type to start with + The evaluation function returning T + Returns the first non null result or null with no match + + + + Gets the reflection information for a directly declared field + The class/type where the field is defined + The name of the field + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field by searching the type and all its super types + The class/type where the field is defined + The name of the field (case sensitive) + A field or null when type/name is null or when the field cannot be found + + + + Gets the reflection information for a field + The class/type where the field is declared + The zero-based index of the field inside the class definition + A field or null when type is null or when the field cannot be found + + + + Gets the reflection information for a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a directly declared property + The class/type where the property is declared + The name of the property (case sensitive) + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a property by searching the type and all its super types + The class/type + The name + A property or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the getter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for the setter method of a property by searching the type and all its super types + The class/type + The name + A method or null when type/name is null or when the property cannot be found + + + + Gets the reflection information for a directly declared method + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The class/type where the method is declared + The name of the method (case sensitive) + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the reflection information for a method by searching the type and all its super types + The full name like Namespace.Type1.Type2:MethodName of the type where the method is declared + Optional parameters to target a specific overload of the method + Optional list of types that define the generic version of the method + A method or null when type/name is null or when the method cannot be found + + + + Gets the names of all method that are declared in a type + The declaring class/type + A list of method names + + + + Gets the names of all method that are declared in the type of the instance + An instance of the type to search in + A list of method names + + + + Gets the names of all fields that are declared in a type + The declaring class/type + A list of field names + + + + Gets the names of all fields that are declared in the type of the instance + An instance of the type to search in + A list of field names + + + + Gets the names of all properties that are declared in a type + The declaring class/type + A list of property names + + + + Gets the names of all properties that are declared in the type of the instance + An instance of the type to search in + A list of property names + + + + Gets the type of any class member of + A member + The class/type of this member + + + + Test if a class member is actually an concrete implementation + A member + True if the member is a declared + + + + Gets the real implementation of a class member + A member + The member itself if its declared. Otherwise the member that is actually implemented in some base type + + + + Gets the reflection information for a directly declared constructor + The class/type where the constructor is declared + Optional parameters to target a specific overload of the constructor + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the constructor cannot be found + + + + Gets the reflection information for a constructor by searching the type and all its super types + The class/type where the constructor is declared + Optional parameters to target a specific overload of the method + Optional parameters to only consider static constructors + A constructor info or null when type is null or when the method cannot be found + + + + Gets reflection information for all declared constructors + The class/type where the constructors are declared + Optional parameters to only consider static constructors + A list of constructor infos + + + + Gets reflection information for all declared methods + The class/type where the methods are declared + A list of methods + + + + Gets reflection information for all declared properties + The class/type where the properties are declared + A list of properties + + + + Gets reflection information for all declared fields + The class/type where the fields are declared + A list of fields + + + + Gets the return type of a method or constructor + The method/constructor + The return type + + + + Given a type, returns the first inner type matching a recursive search by name + The class/type to start searching at + The name of the inner type (case sensitive) + The inner type or null if type/name is null or if a type with that name cannot be found + + + + Given a type, returns the first inner type matching a recursive search with a predicate + The class/type to start searching at + The predicate to search with + The inner type or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first method matching a predicate + The class/type to start searching at + The predicate to search with + The method or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first constructor matching a predicate + The class/type to start searching at + The predicate to search with + The constructor info or null if type/predicate is null or if a type with that name cannot be found + + + + Given a type, returns the first property matching a predicate + The class/type to start searching at + The predicate to search with + The property or null if type/predicate is null or if a type with that name cannot be found + + + + Returns an array containing the type of each object in the given array + An array of objects + An array of types or an empty array if parameters is null (if an object is null, the type for it will be object) + + + + Creates an array of input parameters for a given method and a given set of potential inputs + The method/constructor you are planing to call + The possible input parameters in any order + An object array matching the method signature + + + + A read/writable reference to an instance field + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The runtime instance to access the field (leave empty for static fields) + An readable/assignable object representing the field + + + + Creates an instance field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + A read and writable field reference delegate + + + + Creates an instance field reference for a specific instance + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The instance + The name of the field + An readable/assignable object representing the field + + + + Creates an instance field reference delegate + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The field of the field + A read and writable delegate + + + + A read/writable reference delegate to a static field + The type of the field + An readable/assignable object representing the static field + + + + Creates a static field reference + The class the field is defined in or "object" if type cannot be accessed at compile time + The type of the field + The name of the field + An readable/assignable object representing the static field + + + + Creates a static field reference delegate + The type of the field + The field + A read and writable delegate + + + + Returns who called the current method + The calling method/constructor (excluding the caller) + + + + Rethrows an exception while preserving its stack trace (throw statement typically clobbers existing stack traces) + The exception to rethrow + + + + Tells you if the current runtime is based on Mono + True if we are running under Mono, false otherwise (.NET) + + + + Throws a missing member runtime exception + The type that is involved + A list of names + + + + Gets default value for a specific type + The class/type + The default value + + + + Creates an (possibly uninitialized) instance of a given type + The class/type + The new instance + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + A copy of the original object but of type T + + + + Makes a deep copy of any object + The type of the instance that should be created + The original object + [out] The copy of the original object + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + + + + Makes a deep copy of any object + The original object + The type of the instance that should be created + Optional value transformation function (taking a field name and src/dst instances) + The optional path root to start with + The copy of the original object + + + + Tests if a type is a struct + The type + True if the type is a struct + + + + Tests if a type is a class + The type + True if the type is a class + + + + Tests if a type is a value type + The type + True if the type is a value type + + + + Tests if a type is an integer type + The type + True if the type represents some integer + + + + Tests if a type is a floating point type + The type + True if the type represents some floating point + + + + Tests if a type is a numerical type + The type + True if the type represents some number + + + + Tests if a type is void + The type + True if the type is void + + + + Test whether an instance is of a nullable type + Type of instance + An instance to test + True if instance is of nullable type, false if not + + + + Calculates a combined hash code for an enumeration of objects + The objects + The hash code + + + + General extensions for common cases + + + + Joins an enumeration with a value converter and a delimiter to a string + The inner type of the enumeration + The enumeration + An optional value converter (from T to string) + An optional delimiter + The values joined into a string + + + + Converts an array of types (for example methods arguments) into a human readable form + The array of types + A human readable description including brackets + + + + A full description of a type + The type + A human readable description + + + + A a full description of a method or a constructor without assembly details but with generics + The method/constructor + A human readable description + + + + A helper converting parameter infos to types + The array of parameter infos + An array of types + + + + A helper to access a value via key from a dictionary + The key type + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist + + + + A helper to access a value via key from a dictionary with extra casting + The value type + The dictionary + The key + The value for the key or the default value (of T) if that key does not exist or cannot be cast to T + + + + Escapes Unicode and ASCII non printable characters + The string to convert + The string to convert + A string literal surrounded by + + + + Extensions for + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand has the same type and is equal to the value + + + + Shortcut for testing whether the operand is equal to a non-null value + The + The value + True if the operand is equal to the value + This is an optimized version of for + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand has the same type and is equal to the given operand + + + + Shortcut for code.opcode == opcode && code.OperandIs(operand) + The + The + The operand value + True if the opcode is equal to the given opcode and the operand is equal to the given operand + This is an optimized version of for + + + + Tests for any form of Ldarg* + The + The (optional) index + True if it matches one of the variations + + + + Tests for Ldarga/Ldarga_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for Starg/Starg_S + The + The (optional) index + True if it matches one of the variations + + + + Tests for any form of Ldloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests for any form of Stloc* + The + The optional local variable + True if it matches one of the variations + + + + Tests if the code instruction branches + The + The label if the instruction is a branch operation or if not + True if the instruction branches + + + + Tests if the code instruction calls the method/constructor + The + The method + True if the instruction calls the method or constructor + + + + Tests if the code instruction loads a constant + The + True if the instruction loads a constant + + + + Tests if the code instruction loads an integer constant + The + The integer constant + True if the instruction loads the constant + + + + Tests if the code instruction loads a floating point constant + The + The floating point constant + True if the instruction loads the constant + + + + Tests if the code instruction loads an enum constant + The + The enum + True if the instruction loads the constant + + + + Tests if the code instruction loads a field + The + The field + Set to true if the address of the field is loaded + True if the instruction loads the field + + + + Tests if the code instruction stores a field + The + The field + True if the instruction stores this field + + + + General extensions for collections + + + + A simple way to execute code for every element in a collection + The inner type of the collection + The collection + The action to execute + + + + A simple way to execute code for elements in a collection matching a condition + The inner type of the collection + The collection + The predicate + The action to execute + + + + A helper to add an item to a collection + The inner type of the collection + The collection + The item to add + The collection containing the item + + + + A helper to add an item to an array + The inner type of the collection + The array + The item to add + The array containing the item + + + + A helper to add items to an array + The inner type of the collection + The array + The items to add + The array containing the items + + + + A file log for debugging + + + + Full pathname of the log file, defaults to a file called harmony.log.txt on your Desktop + + + + The indent character. The default is tab + + + + The current indent level + + + + Changes the indentation level + The value to add to the indentation level + + + + Log a string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + The string to log + + + + Logs a list of string in a buffered way. Use this method only if you are sure that FlushBuffer will be called + or else logging information is incomplete in case of a crash + A list of strings to log (they will not be re-indented) + + + + Returns the log buffer and optionally empties it + True to empty the buffer + The buffer. + + + + Replaces the buffer with new lines + The lines to store + + + + Flushes the log buffer to disk (use in combination with LogBuffered) + + + + Log a string directly to disk. Slower method that prevents missing information in case of a crash + The string to log. + + + + Resets and deletes the log + + + + Logs some bytes as hex values + The pointer to some memory + The length of bytes to log + + + + A helper class to retrieve reflection info for non-private methods + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The generic type + The generic result type + The lambda expression using the method + The method in the lambda expression + + + + Given a lambda expression that calls a method, returns the method info + The lambda expression using the method + The method in the lambda expression + + + + A reflection helper to read and write private elements + The result type defined by GetValue() + + + + Creates a traverse instance from an existing instance + The existing instance + + + + Gets/Sets the current value + The value to read or write + + + + A reflection helper to read and write private elements + + + + Creates a new traverse instance from a class/type + The class/type + A instance + + + + Creates a new traverse instance from a class T + The class + A instance + + + + Creates a new traverse instance from an instance + The object + A instance + + + + Creates a new traverse instance from a named type + The type name, for format see + A instance + + + + Creates a new and empty traverse instance + + + + Creates a new traverse instance from a class/type + The class/type + + + + Creates a new traverse instance from an instance + The object + + + + Gets the current value + The value + + + + Gets the current value + The type of the value + The value + + + + Invokes the current method with arguments and returns the result + The method arguments + The value returned by the method + + + + Invokes the current method with arguments and returns the result + The type of the value + The method arguments + The value returned by the method + + + + Sets a value of the current field or property + The value + The same traverse instance + + + + Gets the type of the current field or property + The type + + + + Moves the current traverse instance to a inner type + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type name + A traverse instance + + + + Moves the current traverse instance to a field + The type of the field + The type name + A traverse instance + + + + Gets all fields of the current type + A list of field names + + + + Moves the current traverse instance to a property + The type name + Optional property index + A traverse instance + + + + Moves the current traverse instance to a field + The type of the property + The type name + Optional property index + A traverse instance + + + + Gets all properties of the current type + A list of property names + + + + Moves the current traverse instance to a method + The name of the method + The arguments defining the argument types of the method overload + A traverse instance + + + + Moves the current traverse instance to a method + The name of the method + The argument types of the method + The arguments for the method + A traverse instance + + + + Gets all methods of the current type + A list of method names + + + + Checks if the current traverse instance is for a field + True if its a field + + + + Checks if the current traverse instance is for a property + True if its a property + + + + Checks if the current traverse instance is for a method + True if its a method + + + + Checks if the current traverse instance is for a type + True if its a type + + + + Iterates over all fields of the current type and executes a traverse action + Original object + The action receiving a instance for each field + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each field pair + + + + Iterates over all fields of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the field pair and the instances + + + + Iterates over all properties of the current type and executes a traverse action + Original object + The action receiving a instance for each property + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a pair of instances for each property pair + + + + Iterates over all properties of the current type and executes a traverse action + Original object + Target object + The action receiving a dot path representing the property pair and the instances + + + + A default field action that copies fields to fields + + + + Returns a string that represents the current traverse + A string representation + + + + diff --git a/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/.signature.p7s b/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/.signature.p7s new file mode 100644 index 0000000..15be70d Binary files /dev/null and b/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/.signature.p7s differ diff --git a/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/UnlimitedHugs.Rimworld.HugsLib.7.0.1.nupkg b/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/UnlimitedHugs.Rimworld.HugsLib.7.0.1.nupkg new file mode 100644 index 0000000..6d68619 Binary files /dev/null and b/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/UnlimitedHugs.Rimworld.HugsLib.7.0.1.nupkg differ diff --git a/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/lib/net35/0Harmony.dll b/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/lib/net35/0Harmony.dll new file mode 100644 index 0000000..6c0dd94 Binary files /dev/null and b/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/lib/net35/0Harmony.dll differ diff --git a/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/lib/net472/HugsLib.dll b/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/lib/net472/HugsLib.dll new file mode 100644 index 0000000..da5c501 Binary files /dev/null and b/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/lib/net472/HugsLib.dll differ diff --git a/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/lib/net472/HugsLib.xml b/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/lib/net472/HugsLib.xml new file mode 100644 index 0000000..f0c6503 --- /dev/null +++ b/1.4/Source/DualWield/packages/UnlimitedHugs.Rimworld.HugsLib.7.0.1/lib/net472/HugsLib.xml @@ -0,0 +1,1276 @@ + + + + HugsLib + + + + + Entry point for the library. + Instantiated by the game at the start of DoPlayLoad(). + + + + + Handles the key presses for key bindings added by HugsLib + + + + + Ensures that the library comes after Core in the load order and displays a warning dialog otherwise. + + + + + Checks for Dev mode and bypasses the Restart message box. + Holding Shift will prevent the automatic restart. + + + + + Provides an entry point for late controller setup during static constructor initialization. + + + + + Forwards ticks to the controller. Will not be saved and is never spawned. + + + + + Holds references to key binding defs used by the library. + + + + + A base for managers that save data in xml format, to be stored in the save data folder + + + + + This is added as a component to the GameObject on scene to forward events to the controller. + + + + + Represents the information stored in the About/Version.xml file. + Since we cannot update the version of the library assembly, we have to store the version externally. + + + + + A shorter, invariable alternative to System.Version in the format of major.minor.patch + Also known as a semantic version number. + System.Version can be implicitly cast to this type. + VersionShort is no longer used by HugsLib internally, and the type is retained for backwards compatibility. + + + + + Displays a list to update feature defs with basic image and formatting support. See for proper syntax. + + + + + Stores the highest displayed update news version for all mods that provide update news via . + Defs are loaded from the News folder in the root mod directory. + + + + + Shows the news dialog window when there are not yet displayed news items available. + + Pass true to disable filtering based on what has + and has not been seen and open the dialog with all available news items. + true, if there have been found news items that were not displayed before, and the dialog has been opened + + + + Used to indicate that a type should be instantiated at the earliest moment possible. + Specifically, when classes are instantiated (see .DoPlayLoad()). + If is true, Harmony patching will also happen at that time. + + + + + The front-end for LogPublisher. + Shows the status of the upload operation, provides controls and shows the produced URL. + + + + + Collects the game logs and loaded mods and posts the information on GitHub as a gist. + + + + + Allows adding custom buttons to the EditWindow_Log window. + + + + + Alignment side for custom widgets. + + + + + Callback to draw log window widgets in. + + The log window being dawn. + Window area for custom widgets. + The currently selected log message, or null. + Draw your widget using this to automatically align it with the others. + + + + Adds a new drawing callback to the log window widget drawer. + + The delegate called each OnGUI to draw the widget. + The side of the WidgetRow this widget should be drawn into. + + + + Adds an entry point to draw and additional debug button on the toolbar. + The infix is necessary to catch the WidgetRow that the stock buttons are drawn to. + + + + + Extends the width of the immediate window the dev toolbar buttons are drawn to to accommodate an additional button + + + + + Adds a hook for the early initialization of a Game. + + + + + Forces a game restart after a language change. + This is necessary to avoid creating problems for running mods caused by reloaded graphics and defs. + + + + + Adds a hook for discarding maps. + + + + + Replaces the "Mod Settings" button in the Options dialog with our own. + + + + + Adds extra buttons to the Log window. + + + + + Adds a hook to produce the WorldLoaded callback for ModBase mods. + + + + + Adds a hook to produce the MapGenerated callback for ModBase mods. + + + + + Adds a hook to produce the MapComponentsInitializing callback for ModBase mods. + + + + + Adds a hook to produce the MapLoaded callback for ModBase mods. + + + + + Restarts the game automatically, bypassing the message dialog, if changes in the mod configuration have been made and dev mode is on. + Holding Shift will prevent the restart, while allowing the config changes to still be saved. + + + + + Adds a hook to produce the DefsLoaded callback for ModBase mods. + + + + + Adds an entry point during map quickstart for the quickstarter system. + Will replace the standard scenario and map size if the quickstarter is enabled. + + + + + Hooks into the flow of the vanilla MonoBehavior.Update() + + + + + Hooks into the flow of the vanilla MonoBehavior.OnGUI() + This allows to take advantage of automatic UI scaling and prevents GUI updates during a loading screen. + + + + + Allows to change settings related to the custom quickstart functionality. + Strings are not translated, since this is a tool exclusively for modders. + + + + + Manages the custom quickstart functionality. + Will trigger map loading and generation when the appropriate settings are present, and draws an additional dev toolbar button. + + + + + Wraps settings related to the Quickstart system for storage in a SettingHandle. + + + + + Utility methods for SettingHandleConvertible data objects. + These are useful for packing and unpacking your custom fields into a string without bothering with manual serialization. + + + + + Deserializes an XML string into an existing object instance. + + The serialized values to fill the object with + The object to receive the deserialized values + + + + Serializes an object into a compact XML string. + Whitespace and namespace declarations are omitted. + Make sure the object is annotated with SerializableAttribute and the fields to serialize with XmlElementAttribute. + + The object to serialize + + + + Commands start a new process on the target machine using platform specific commands and args to pass to the shell. + Refer to the Microsoft documentation for dotNet 3.5 for more info on a process. + https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.90).aspx + + + + + A command to open a directory in the systems default file explorer. + Since Unity's OpenUrl() is broken on OS X, we can use a shell to do it correctly. + + + + + A Command to open the log file in the systems default text editor. + + + + + A Command to cleanly restart RimWorld on the target machine. + + + + + The hub of the library. Instantiates classes that extend ModBase and forwards some of the more useful events to them. + The assembly version of the library should reflect the current major Rimworld version, i.e.: 0.18.0.0 for B18. + This gives us the ability to release updates to the library without breaking compatibility with the mods that implement it. + See Core.HugsLibMod for the entry point. + + + + + The base class for all mods using HugsLib library. All classes extending ModBase will be instantiated + automatically by at game initialization. + Can be annotated with to initialize the mod at + initialization time and have be called. + + + + + This can be used to log messages specific to your mod. + It will prefix everything with your ModIdentifier. + + + + + The ModSettingsPack specific to your mod. + Use this to create settings handles that represent the values of saved settings. + + + + + Override this and return false to prevent a Harmony instance from being automatically created and scanning your assembly for patches. + + + + + The reference to Harmony instance that applied the patches in your assembly. + + + + + A unique identifier used both as and . + Override them separately if different identifiers are needed or no should be assigned to . + Must start with a letter and contain any of [A-z, 0-9, -, _, :] (identifier must be valid as an XML tag name). + + + This is no longer used to identify mods since 7.0 (Rimworld 1.1). Use ModBase.ModContentPack.PackageId to that end instead. + + + + + A unique identifier to use as a key when settings are stored for this mod by . + Must start with a letter and contain any of [A-z, 0-9, -, _, :] (identifier must be valid as an XML tag name). + By default uses the PackageId of the implementing mod. + Returning null will prevent the property from being assigned. + + + + + A readable identifier for the mod, used as a prefix by and in various error messages. + Appear as "[LogIdentifier] message" when using . + By default uses the non-lowercase PackageId of the implementing mod or the type name if that is not set. + + + + + The null-checked version of . + Returns the type name if is null. + + + + + The content pack for the mod containing the assembly this class belongs to + + + + + Can be false if the mod was enabled at game start and then disabled in the mods menu. + Always true, unless the of the declaring mod can't be + identified for some unexpected reason. + + + + + Contains the AssemblyVersion and AssemblyFileVersion of the mod. Used by . + + + + + Added to avoid breaking mod compatibility during the 7.0 update. + TODO: kill this during the next major update + + + + + Return the override version from the Version.xml file if specified, + or the higher one between AssemblyVersion and AssemblyFileVersion + + + + + Called during HugsLib instantiation, accounting for mod load order. + Load order among mods implementing is respected. + and only if the implementing class is annotated with . + + + + + Called when HugsLib receives the call. + Load order among mods implementing is respected. + Called after the static constructors for non-HugsLib mods have executed. Is not called again on def reload + + + + + An alias for , both or either can be used, + although makes for clearer code by indicating when the method is called. + + + + + Called on each tick when in Play scene + + The sequential number of the tick being processed + + + + Called each frame + + + + + Called each unity physics update + + + + + Called on each unity gui event, after UIRoot.UIRootOnGUI. + Respects UI scaling and screen fading. Will not be called during loading screens. + This is a good place to listen for hotkey events. + + + + + Called when GameState.Playing has been entered and the world is fully loaded in the Play scene. + Will not be called during world generation and landing site selection. + + + + + Called right after Map.ConstructComponents() (before MapLoaded) + + The map being initialized + + + + Called right after a new map has been generated. + This is the equivalent of MapComponent.MapGenerated(). + + The new map that has just finished generating + + + + Called when the map was fully loaded + + The map that has finished loading + + + + Called after a map has been abandoned or otherwise made inaccessible. + Works on player bases, encounter maps, destroyed faction bases, etc. + + The map that has been discarded + + + + Called after each scene change + + The scene that has been loaded + + + + Called after settings menu changes have been confirmed. + This is called for all mods, regardless if their own settings have been modified, or not. + + + + + Called after StaticInitialize and when defs have been reloaded. This is a good place to inject defs. + Get your settings handles here, so that the labels will properly update on language change. + If the mod is disabled after being loaded, this method will STILL execute. Use ModIsActive to check. + + + There is no scenario in which defs are reloaded without the game restarting, save for a mod manually initiating a reload. + When def reloading is not an issue, anything done by this method can be safely done in StaticInitialize. + + + + + Describes a single update news item. + Recommended to be placed in the /News folder in the root directory of the mod. + Can be loaded from the /Defs folder, but any placed + in the /News folder will unload all s loaded from /Defs. + + + + + An optional unique identifier to reference the mod that adds this news item. + If not set, the PackageId of the mod will be used. + Must start with a letter and contain any of [A-z, 0-9, -, _, :] + + + Used to preserve compatibility with pre-RW1.1 HugsLib news data, such as already displayed news items and ignored news providers. + Previously used to reference a BodBase.ModIdentifier which had to be loaded for the defining news def to be displayed. + + + + + Displayed in the title of the news item + + + + + Optional complete replacement for the news item title + + + + + The version number associated with the news item. Format: major.minor.patch + Used to sort news items and determine which items have not been displayed yet. + + + For example, after an item with version 3.2.1 has been displayed, adding an item with version 3.2.0 will not cause the + New Mod Features dialog to automatically open. However, both items will still appear the next time the dialog is opened. + The version of the mod adding the news item is no longer required to be equal or higher for a news item to be displayed. + + + + + The text of the news item. Can contain text and images, supports Unity html markup (only recommended for highlighting). + The text can contain the following formatting markers: + | -> (pipe) splits the content into segments. A segment can be a paragraph or image sequence + img:name1,name2 -> Displays a horizontal image sequence. Image names are file names without the extension. + caption:text -> Attaches a text paragraph on the right side of the preceding image + Everything else is treated as plain text and creates a paragraph. + + Paragraph1|Paragraph2|img:singleImage|caption:caption\ntext|img:sequence1,sequence2|More text + + + + When set to true (true by default), leading and trailing whitespace characters (spaces, tabs, newlines) + are removed from content captions and paragraphs. + This makes it easier lay out your content and not have to cram everything into one line. + + + + + Optional link to a forum post/info page for this update, or the whole mod. Displayed in the news item title. + + + + + Returns the Id of the owning mod. + is used if defined, and ModContentPack.PackageId otherwise. + + + + + An options window for all configurable settings exposed by mods using the library + + + + + Injects the "Mod Settings" button into the Options dialog. + + + + + Base type for all custom SettingHandle types. + Allows complex data structures to be stored in setting values by converting them to and from their string representation. + See for an easy way to serialize complex types to XML. + + + + + Return false to prevent this object from serializing and being written to file. + + + + + Called when settings handles of this type load an existing value. + Should deserialize and restore the state of the object using the provided string. + + + + + Called when handles of this type are being saved, and only if return true. + Should serialize the state of the object into a string so it can be restored later. + + + + + A set of useful value constraints for use with SettingHandle + + + + + A group of settings values added by a mod. Each mod has their own ModSettingsPack. + Loaded values are stored until they are "claimed" by their mod by requesting a handle for a setting with the same name. + + + + + Identifier of the mod that owns this pack + + + + + The name of the owning mod that will display is the Mod Settings dialog + + + + + Special display order for the mod in the Mod Settings dialog. + Mods are generally ordered by name. Please leave this at Normal unless you have a good reason to change it. + + + + + Returns true if any handles retrieved from this pack have had their values changed. + Resets to false after the changes are saved. + + + + + Enumerates the handles that have been registered with this pack up to this point. + + + + + Set to true to disable the collapsing of setting handles in the Mod Settings dialog. + + + + + Retrieves an existing SettingHandle from the pack, or creates a new one. + Loaded settings will only display in the Mod Settings dialog after they have been claimed using this method. + + The type of setting value you are creating. + Unique identifier for the setting. Must be unique for this specific pack only. + A display name for the setting that will show up next to it in the Mod Settings dialog. Recommended to keep this short. + A description for the setting that will appear in a tooltip when the player hovers over the setting in the Mod Settings dialog. + The value the setting will assume when newly created and when the player resets the setting to its default. + An optional delegate that will be called when a new value is about to be assigned to the handle. Receives a string argument and must return a bool to indicate if the passed value is valid for the setting. + Used only for Enum settings. Enum values are displayed in a readable format by the following method: Translate(prefix+EnumValueName) + + + + Returns a handle that was already created. + Will return null if the handle does not exist yet. + + Throws an exception if the referenced handle does not match the provided type + The name of the handle to retrieve + + + + Attempts to retrieve a setting value by name. + If a handle for that value has already been created, returns that handle's StringValue. + Otherwise will return the unclaimed value that was loaded from the XML file. + Will return null if the value does not exist. + + The name of the setting the value of which should be retrieved + + + + Returns true, if there is a setting value that can be retrieved with PeekValue. + This includes already created handles and unclaimed values. + + The name of the setting to check + + + + Deletes a setting loaded from the xml file before it is claimed using GetHandle. + Useful for cleaning up settings that are no longer in use. + + The identifier of the setting (handle identifier) + + + + Prompts the to save changes if any or the registered + s have handles with unsaved changes + + + + + A central place for mods to store persistent settings. Individual settings are grouped by mod using ModSettingsPack + + + + + Fires when is called and changes are about to be saved. + Use and to identify changed packs, + and with to identify changed handles. + + + + + Fires when is called and the settings file has just been written to disk. + + + + + Enumerates the s that have been registered up to this point. + + + + + Returns true when there are handles with values that have changed since the last time settings were saved. + + + + + Retrieves the ModSettingsPack for a given mod identifier. + + The unique identifier of the mod that owns the pack + A display name of the mod owning the pack. This will be displayed in the Mod Settings dialog. + + + + Saves all settings to disk and notifies all ModBase mods by calling SettingsChanged() + + + + + Removes a settings pack for a mod if it exists. Use SaveChanges to apply the change afterward. + + The identifier of the mod owning the pack + + + + An individual persistent setting owned by a mod. + The extra layer of inheritance allows for type abstraction and storing SettingHandles in lists. + + + + + Unique identifier of the setting. + + + + + Name displayed in the settings menu. + + + + + Displayed as a tooltip in the settings menu. + + + + + Should return true if the passed value is valid for this setting. Optional. + + + + + The string identifier prefix used to display enum values in the settings menu (e.g. "prefix_" for "prefix_EnumValue") + + + + + Return true to make this setting visible in the menu. Optional. + An invisible setting can still be reset to default using the Reset All button. + + + + + Draw a custom control for the settings menu entry. Entry name is already drawn when this is called. Optional. Return value indicates if the control changed the setting. + + + + + When true, setting will never appear. For serialized data. + No longer affects value resetting, see + + + + + When true (true by default), the setting can be reset to its default value by the player. + If the handle is visible, this can be done through the right-click menu, or using the "Reset all" button. + Disabling this is generally not recommended, except for specific use cases (for example, content unlocked by the player). + + + + + When true, will not save this setting to the xml file. Useful in conjunction with CustomDrawer for placing buttons in the settings menu. + + + + + Specifies by how much the + and - buttons should change a numeric setting. + + + + + When CustomDrawer is used, specifies the height of the row for the handle. Leave at 0 for default height. + + + + + Affects the order in which handles appear in the settings menu. Lower comes first, default is 0. + + + + + Returns true if the of this handle has been modified + after the creation of the handle or the last time its value was saved. + Automatically resets to false when saves changes. + Can be manually toggled when e.g. replacing null with an instance in a handle. + + + + + Marks the handle as modified and forces all settings to be saved. + This is necessary for values, as changes in reference types cannot be automatically detected. + + + + + Implicitly cast handles to the Value they carry. + + + + + Called when the Value of the handle changes. Optional. + + + + + The actual value of the setting. + This is converted to its string representation when settings are saved. + Assigning a new value will trigger the OnValueChanged delegate. + + + + + The value the setting assumes when initially created or reset. + + + + + Retrieves the string representation of the setting or assigns a new setting value using a string. + Will trigger the Validator delegate if assigned and change the Value property if the validation passes. + + + + + Returns the type of the handle Value property. + + + + + Assigns the default value to the Value property. + Ignores the property. + + + + + Returns true if the handle is set to its default value. + + + + + + Provides a convenient way to read, compare and print out the assembly version and file version of assemblies. + + + + + Tries to read the file assembly version in addition to the already known assembly version. + + The assembly to read + The full path to the assembly file, if is not set + An with only AssemblyVersion set if an exception was encountered + + + + Reads assembly version information for a mod assembly. + + The assembly to read + The content pack the assembly was loaded from + See + + + + A way to schedule single-use callbacks for an upcoming event. + Useful to break the stack and ensure code is run in the main thread. + Access via HugsLibController.Instance.DoLater + + + + + Schedule a callback to be executed at the start of the next tick + + + + + Schedule a callback to be executed at the start of the next frame + + + + + Schedule a callback to be executed at the start of the next OnGUI + + + + + Schedule a callback to be executed the next time a map has finished loading + + The callback receives the map that has finished loading + + + + + Registers a delegate to be called in a given number of ticks. + + The delegate to be called + The delay in ticks before the delegate is called + Optional owner of the delegate. Callback will not fire if the Thing is not spawned at call time. + If true, the callback will be rescheduled after each call until manually unscheduled + + + + Manually remove a callback to abort a delay or clear a recurring callback. + Silently fails if the callback is not found. + + The scheduled callback + + + + Only for debug purposes + + + + + A classic A15-style confirm dialog with Esc and Enter key support. + + + + + A compact message dialog with a title and a custom close button label. + + + + A title to display in the dialog + A message to display in the dialog + A custom label to the close button. Optional- when null, the default label will be used instead. + A callback to call when the dialog is closed + + + + A ticking scheduler for things that require a tick only every so often. + Distributes tick calls uniformly over multiple frames to reduce the workload. + Optimized for many tick recipients with the same tick interval. + + + + + Registers a delegate to be called every tickInterval ticks. + + The delegate that will be called + The interval between the calls (for example 30 to have the delegate be called 2 times a second) + The Thing the delegate is attached to. The callback will be automatically unregistered if the owner is found to be despawned at call time. + + + + Manually removes a delegate to prevent further calls. + + Throws if the provided owner is not registered. Use IsRegistered() to check. + The Thing the delegate was registered with + + + + Returns true if the passed Thing is registered as the owner of a delegate. + + + + + + + Returns all registered tick recipients + + + + + + Returns the number of calls issued across all intervals during the last tick + + + + + Returns the number of active tickers (intervals) + + + + + Tools for working with the Harmony library. + + + + + Produces a human-readable list of all methods patched by all Harmony instances and their respective patches. + + + + + Produces a human-readable list of all methods patched by a single Harmony instance and their respective patches. + + A Harmony instance that can be queried for patch information. + + + + Produces a human-readable list of Harmony patches on a given set of methods. + + + + + Produces a human-readable list of all Harmony versions present and their respective owners. + + A Harmony instance that can be queried for version information. + + + + + A catch-all place for extension methods and other useful stuff + + + + + Returns true if the left or right Shift keys are currently pressed. + + + + + Returns true if the left or right Alt keys are currently pressed. + + + + + Returns true if the left or right Control keys are currently pressed. + Mac command keys are supported, as well. + + + + + Returns an enumerable as a comma-separated string. + + A list of elements to string together + + + + Returns an enumerable as a string, joined by a separator string. By default null values appear as an empty string. + + A list of elements to string together + A string to inset between elements + If true, null elements will appear as "[null]" + + + + Returns a version as major.minor.patch formatted string. + + + + + Checks if a Thing has a designation of a given def. + + + The designation def to check for + + + + Adds or removes a designation of a given def on a Thing. Fails silently if designation is already in the desired state. + + The thing to designate + The DesignationDef to apply or remove + True to add the designation, false to remove + + + + Checks if a cell has a designation of a given def + + The map position to check + The DesignationDef to detect + The map to look on. When null, defaults to VisibleMap. + + + + Adds or removes a designation of a given def on a cell. Fails silently if designation is already in the desired state. + + The position to designate + The DesignationDef to apply or remove + True to add the designation, false to remove + The map to operate on. When null, defaults to VisibleMap. + + + + Returns true, if a MethodInfo matches the provided signature. + + Note: instance methods always take their parent type as the first parameter. + The method to check + Expected return type of the checked method + Expected parameter types of the checked method + + + + Returns an attribute from a member, if it exists. + Mods could include attributes from libraries that are not loaded, which would throw an exception, so error checking is included. + + The type of the attribute to fetch + The member to fetch the attribute from + + + + Enumerates all loaded assemblies, including stock and enabled mods. + + + + + Returns true if the mod with a matching name is currently loaded in the mod configuration. + + The ModMetaData.Name to match + + + + Copies a string to the system copy buffer and displays a confirmation message. + + + + + Expands a shorthand unix user directory path with its full system path. + + + + + Adds double quotes to the start and end of a string. + + + + + Attempts to return the patch of the log file Unity is writing to. + + + + + + Sends a constructed UnityWebRequest, waits for the result, and returns the data via callbacks. + + Use UnityWebRequest or WWW to construct a request. Do not call Send(). + Called with the response body if server replied with status 200. + Called with the error message in case of a network error or if server replied with status other than 200. + The expected status code in the response for the request to be considered successful + How long to wait before aborting the request + + + + Tries to find the file handle for a given mod assembly name. + + This is a replacement for mod assemblies are loaded from byte arrays. + The of the assembly + The content pack the assembly was presumably loaded from + Returns null if the file is not found + + + + Same as but suppresses all exceptions. + + + + + Adds a hash to a manually instantiated def to avoid def collisions. + + + + + Give a short hash to a def created at runtime. + Short hashes are used for proper saving of defs in compressed maps within a save file. + + + The type of defs your def will be saved with. For example, use typeof(ThingDef) if your def extends ThingDef. + + + + Injects a map component into the current map if it does not already exist. + Required for new MapComponents that were not active at map creation. + The injection is performed at ExecuteWhenFinished to allow calling this method in MapComponent constructors. + + The MapComponent that is expected to be present is the map's component list + + + + Gets the map component of the given type from a map. + Will throw an exception if a component of the requested type is not found. + + The type of your MapComponent + The map to get the component from + + + + A logger that prefixes all messages with the identifier of the issuing mod. + + + + + Writes a message to the log, prefixing it with the issuing mod identifier. + + The message to write + Optional substitution values for the message + + + + Same as Message(), but the console will display the message as a warning. + + + + + Same as Message(), but the console will display the message as an error. + This will open the Log window in in Dev mode. + + + + + Writes a message only if Dev mode is enabled. + Message is written using Tracer.Trace with the addition of the ModIdentifier as the first value. + + The strings to display + + + + Same as Trace(), but formats the message and replaces substitution variables. + + + + + Writes an error to the log to report an exception. + The message will contain the name of the method that caused the exception if a location is not provided. + + The exception that occurred + Optional identifier of the mod that caused the exception + True, if the exception should only be reported once for that specific location. Useful for errors that will trigger each frame or tick. + Optional name of the location where the exception occurred. Will display as "exception during (location)" + + + + A tool to identify the platform the game is running on. + + + + + Utility methods for displaying debug messages during development. + + + + + Writes comma-separated log messages if the game is in Dev mode. + Any non-strings will be converted to strings, and null values will appear explicitly. + + Messages to output + + + + Similar to Trace, but feeds the messages through String.Format first. + + The string to interpolate + Interpolation arguments + + + + Base type for utility WorldObjects repurposed to store data. See UtilityWorldObjectManager for more info. + + + + + Handles utility WorldObjects of custom types. + Utility WorldObjects are a map-independent storage method for custom data. + All UWOs share the same def and aren't visible on the world, but are saved and loaded with it. + + + + + Returns an existing UWO or creates a new one, adding it to the world. + + Your custom type that extends UtilityWorldObject + + + + Displays custom settings controls for mods that use the vanilla mod settings system. + The dialog shows the controls for a single mod only and is opened through Dialog_ModSettings. + + + + diff --git a/About/About.xml b/About/About.xml index 0dd9c55..060abc9 100644 --- a/About/About.xml +++ b/About/About.xml @@ -7,6 +7,7 @@
  • 1.1
  • 1.2
  • 1.3
  • +
  • 1.4
  • diff --git a/LoadFolders.xml b/LoadFolders.xml deleted file mode 100644 index 2a29d8b..0000000 --- a/LoadFolders.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - -
  • -
  • 1.1
  • - - -
  • -
  • 1.1
  • -
    - -
  • -
  • 1.3
  • -
    -