Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
a couple of fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chasmical committed May 11, 2021
1 parent 29c2097 commit e604e8c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions RogueLibsCore/Hooks/Items/CustomItemInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ private CustomItemInfo(Type type)
}
if (typeof(IItemTargetable).IsAssignableFrom(type))
{
IgnoreChecks_TargetFilter = type.GetInterfaceMethod(typeof(IItemCombinable),
IgnoreChecks_TargetFilter = type.GetInterfaceMethod(typeof(IItemTargetable),
nameof(IItemTargetable.TargetFilter)).GetCustomAttribute<IgnoreChecksAttribute>()?.IgnoredChecks ?? RogueUtilities.Empty;
IgnoreChecks_TargetObject = type.GetInterfaceMethod(typeof(IItemCombinable),
IgnoreChecks_TargetObject = type.GetInterfaceMethod(typeof(IItemTargetable),
nameof(IItemTargetable.TargetObject)).GetCustomAttribute<IgnoreChecksAttribute>()?.IgnoredChecks ?? RogueUtilities.Empty;
IgnoreChecks_TargetObject = type.GetInterfaceMethod(typeof(IItemCombinable),
IgnoreChecks_TargetObject = type.GetInterfaceMethod(typeof(IItemTargetable),
nameof(IItemTargetable.TargetTooltip)).GetCustomAttribute<IgnoreChecksAttribute>()?.IgnoredChecks ?? RogueUtilities.Empty;
}
}
Expand Down
2 changes: 1 addition & 1 deletion RogueLibsCore/Hooks/Unlocks/UnlockWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public abstract class UnlockWrapper : IHook<Unlock>
/// <param name="unlockedFromStart">Determines whether the unlock is unlocked from the start.</param>
protected UnlockWrapper(string name, string type, bool unlockedFromStart)
{
Unlock = new Unlock(name, type, unlockedFromStart) { __RogueLibsCustom = this };
Name = name;
Type = type;
Unlock = new Unlock(name, type, unlockedFromStart) { __RogueLibsCustom = this };
}
internal UnlockWrapper(Unlock unlock)
{
Expand Down
6 changes: 3 additions & 3 deletions RogueLibsCore/Patches/Patches_TraitsStatusEffects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ public void PatchTraitsAndStatusEffects()
new Type[] { typeof(string), typeof(bool) });

#pragma warning disable CS0618 // NetworkInstanceId is obsolete
Patcher.Prefix(typeof(StatusEffects), nameof(StatusEffects.RemoveTrait), nameof(StatusEffects_RemoveTrait_Prefix),
Patcher.Prefix(typeof(StatusEffects), nameof(StatusEffects.RemoveStatusEffect), nameof(StatusEffects_RemoveStatusEffect_Prefix),
new Type[] { typeof(string), typeof(bool), typeof(NetworkInstanceId), typeof(bool) });
Patcher.Postfix(typeof(StatusEffects), nameof(StatusEffects.RemoveTrait),
Patcher.Postfix(typeof(StatusEffects), nameof(StatusEffects.RemoveStatusEffect),
new Type[] { typeof(string), typeof(bool), typeof(NetworkInstanceId), typeof(bool) });
#pragma warning restore CS0618

Patcher.Transpiler(typeof(StatusEffects), nameof(StatusEffects.GetStatusEffectTime));
Patcher.Postfix(typeof(StatusEffects), nameof(StatusEffects.GetStatusEffectHate));

Patcher.Prefix(typeof(StatusEffects), nameof(StatusEffects.UpdateStatusEffect));
Patcher.Prefix(typeof(StatusEffects), nameof(StatusEffects.UpdateTrait));
// Patcher.Prefix(typeof(StatusEffects), nameof(StatusEffects.UpdateTrait));
}

/// <summary>
Expand Down

0 comments on commit e604e8c

Please sign in to comment.