using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using Microsoft.CodeAnalysis;
using Mirror;
using UnityEngine;
using UnityEngine.SceneManagement;
using YAPYAP;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("com.Omniscye.Froggy")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+174558dd641ee37bf40ded0d24866ac172d24388")]
[assembly: AssemblyProduct("com.Omniscye.Froggy")]
[assembly: AssemblyTitle("EmpressFroggy")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace BepInEx
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
internal sealed class BepInAutoPluginAttribute : Attribute
{
public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
{
}
}
}
namespace BepInEx.Preloader.Core.Patching
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
internal sealed class PatcherAutoPluginAttribute : Attribute
{
public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null)
{
}
}
}
namespace YapYapMods
{
[BepInPlugin("empress.yapyap.frogtransform", "Frog Transform", "1.2.6")]
public class FrogTransformPlugin : BaseUnityPlugin
{
private class RemoteBind
{
public GameObject Frog;
public NetworkIdentity FrogNi;
public Rigidbody FrogRb;
public Animator FrogAnimator;
public Pawn Pawn;
public Vector3 LastPos;
}
[CompilerGenerated]
private sealed class <SpawnCoinsRoutineServer>d__52 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public Vector3 origin;
public Vector3 fwd;
public FrogTransformPlugin <>4__this;
private Vector3 <mouthPos>5__2;
private int <i>5__3;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <SpawnCoinsRoutineServer>d__52(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
int num = <>1__state;
FrogTransformPlugin frogTransformPlugin = <>4__this;
if (num != 0)
{
if (num != 1)
{
return false;
}
<>1__state = -1;
goto IL_0127;
}
<>1__state = -1;
<mouthPos>5__2 = origin + fwd * 0.5f + Vector3.up * 0.4f;
<i>5__3 = 0;
goto IL_0139;
IL_0127:
<i>5__3++;
goto IL_0139;
IL_0139:
if (<i>5__3 < frogTransformPlugin._coinSpitCount)
{
GameObject obj = Object.Instantiate<GameObject>(frogTransformPlugin._cachedCoinPrefab, <mouthPos>5__2, Random.rotation);
NetworkServer.Spawn(obj, (NetworkConnectionToClient)null);
Rigidbody componentInChildren = obj.GetComponentInChildren<Rigidbody>(true);
if ((Object)(object)componentInChildren != (Object)null)
{
Vector3 val = Random.insideUnitSphere * 0.5f;
Vector3 val2 = fwd + Vector3.up * 0.5f + val;
Vector3 normalized = ((Vector3)(ref val2)).normalized;
componentInChildren.velocity = normalized * frogTransformPlugin._coinSpitForce * Random.Range(0.8f, 1.2f);
componentInChildren.angularVelocity = Random.insideUnitSphere * 10f;
}
if (<i>5__3 % 5 == 0)
{
<>2__current = null;
<>1__state = 1;
return true;
}
goto IL_0127;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
private ConfigEntry<KeyboardShortcut> _transformKey;
private ConfigEntry<KeyboardShortcut> _abilityKey;
private GameObject _frogInstance;
private Rigidbody _frogRb;
private Animator _frogAnimator;
private Collider[] _frogColliders;
private Pawn _localPawn;
private bool _pawnRenderersHidden;
private Vector2 _moveInput;
private Vector3 _desiredDir;
private float _desiredMag;
private float _turnSpeed = 12f;
private float _hopUpImpulse = 5f;
private float _hopForwardImpulse = 3.2f;
private float _hopCooldown = 0.45f;
private float _lastHopTime = -999f;
private float _maxHorizontalSpeed = 3.4f;
private float _airControl = 0.35f;
private float _groundCoyoteTime = 0.12f;
private float _lastGroundedTime = -999f;
private float _ungroundVelThreshold = 0.25f;
private int _coinSpitCount = 30;
private float _coinSpitForce = 5f;
private GameObject _cachedCoinPrefab;
private float _abilityCooldown = 0.25f;
private float _lastAbilityTime = -999f;
private Type _npcAIAgentType;
private Type _navMeshAgentType;
private Type _iplayerControllableNpcType;
private GameObject _managerGO;
private readonly Dictionary<uint, RemoteBind> _remoteBinds = new Dictionary<uint, RemoteBind>();
private readonly HashSet<uint> _hiddenPawnNetIds = new HashSet<uint>();
private readonly Dictionary<uint, uint> _frogOwnerCache = new Dictionary<uint, uint>();
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Expected O, but got Unknown
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
_managerGO = new GameObject("FrogTransform_Manager");
((Object)_managerGO).hideFlags = (HideFlags)61;
Object.DontDestroyOnLoad((Object)(object)_managerGO);
_npcAIAgentType = AccessType("YAPYAP.NpcAIAgent");
_navMeshAgentType = AccessType("UnityEngine.AI.NavMeshAgent");
_iplayerControllableNpcType = AccessType("YAPYAP.IPlayerControllableNpc");
_transformKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Input", "Transform Key", new KeyboardShortcut((KeyCode)112, Array.Empty<KeyCode>()), "The key used to toggle frog transformation.");
_abilityKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Input", "Ability Key", new KeyboardShortcut((KeyCode)120, Array.Empty<KeyCode>()), "The key used to perform the frog ability.");
RegisterSerializers();
YapNetworkManager.OnClientStartedAction += RegisterClientHandlers;
YapNetworkManager.OnServerStartedAction += RegisterServerHandlers;
SceneManager.sceneLoaded += delegate
{
_localPawn = null;
_cachedCoinPrefab = null;
if ((Object)(object)_frogInstance != (Object)null)
{
Object.Destroy((Object)(object)_frogInstance);
}
_frogInstance = null;
};
((BaseUnityPlugin)this).Logger.LogInfo((object)"[FrogTransform] Loaded v1.2.6. Serialization Fixes Applied.");
}
private void Update()
{
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
TryAcquireLocalPawn();
MaintainRemoteFrogBinds();
KeyboardShortcut value = _transformKey.Value;
if (((KeyboardShortcut)(ref value)).IsDown() && NetworkServer.active)
{
if ((Object)(object)_frogInstance == (Object)null)
{
RequestTransform(intoFrog: true);
}
else
{
RequestTransform(intoFrog: false);
}
}
if ((Object)(object)_frogInstance == (Object)null)
{
CheckForAssignedFrog();
return;
}
if ((Object)(object)_localPawn != (Object)null)
{
((Component)_localPawn).transform.position = _frogInstance.transform.position;
}
_moveInput = new Vector2((Input.GetKey((KeyCode)100) ? 1f : 0f) + (Input.GetKey((KeyCode)97) ? (-1f) : 0f), (Input.GetKey((KeyCode)119) ? 1f : 0f) + (Input.GetKey((KeyCode)115) ? (-1f) : 0f));
value = _abilityKey.Value;
if (((KeyboardShortcut)(ref value)).IsDown())
{
RequestAbility();
}
}
private void FixedUpdate()
{
if (!((Object)(object)_frogInstance == (Object)null))
{
FrogMovementFixedTick();
}
}
private void CheckForAssignedFrog()
{
if ((Object)(object)_localPawn == (Object)null || !NetworkClient.active)
{
return;
}
foreach (NetworkIdentity value in NetworkClient.spawned.Values)
{
if (value.isOwned && LooksLikeFrog(((Component)value).gameObject))
{
SetupLocalFrog(((Component)value).gameObject);
break;
}
}
}
private void SetupLocalFrog(GameObject frog)
{
_frogInstance = frog;
((Object)_frogInstance).name = "FrogTransform_MyFrog";
Object.DontDestroyOnLoad((Object)(object)_frogInstance);
_frogRb = _frogInstance.GetComponentInChildren<Rigidbody>(true);
_frogAnimator = _frogInstance.GetComponentInChildren<Animator>(true);
_frogColliders = _frogInstance.GetComponentsInChildren<Collider>(true);
if ((Object)(object)_frogRb != (Object)null)
{
_frogRb.isKinematic = false;
_frogRb.useGravity = true;
_frogRb.interpolation = (RigidbodyInterpolation)1;
_frogRb.collisionDetectionMode = (CollisionDetectionMode)2;
_frogRb.constraints = (RigidbodyConstraints)80;
_frogRb.drag = 2f;
_frogRb.angularDrag = 8f;
}
SetupAnimator(_frogAnimator);
DisableAIMovers(_frogInstance);
HidePawnEverywhere(_localPawn, hide: true);
SetPawnDormant(dormant: true);
((BaseUnityPlugin)this).Logger.LogInfo((object)"[FrogTransform] Control Taken.");
}
private void RevertToPawn()
{
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
SetPawnDormant(dormant: false);
HidePawnEverywhere(_localPawn, hide: false);
if ((Object)(object)_localPawn != (Object)null && (Object)(object)_frogInstance != (Object)null)
{
try
{
_localPawn.SvTeleport(_frogInstance.transform.position, false, false);
}
catch
{
((Component)_localPawn).transform.position = _frogInstance.transform.position;
}
}
_frogInstance = null;
_frogRb = null;
_frogAnimator = null;
_frogColliders = null;
if ((Object)(object)_localPawn != (Object)null && (Object)(object)_localPawn.PawnCamera != (Object)null)
{
_localPawn.PawnCamera.SnapCamFollowTarget();
}
((BaseUnityPlugin)this).Logger.LogInfo((object)"[FrogTransform] Reverted.");
}
private void FrogMovementFixedTick()
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_029a: Unknown result type (might be due to invalid IL or missing references)
//IL_0217: Unknown result type (might be due to invalid IL or missing references)
//IL_021c: Unknown result type (might be due to invalid IL or missing references)
//IL_0220: Unknown result type (might be due to invalid IL or missing references)
//IL_022c: Unknown result type (might be due to invalid IL or missing references)
//IL_0239: Unknown result type (might be due to invalid IL or missing references)
//IL_0244: Unknown result type (might be due to invalid IL or missing references)
//IL_0249: Unknown result type (might be due to invalid IL or missing references)
//IL_024b: Unknown result type (might be due to invalid IL or missing references)
//IL_024d: Unknown result type (might be due to invalid IL or missing references)
//IL_0261: Unknown result type (might be due to invalid IL or missing references)
//IL_0266: Unknown result type (might be due to invalid IL or missing references)
//IL_026e: Unknown result type (might be due to invalid IL or missing references)
//IL_0275: Unknown result type (might be due to invalid IL or missing references)
//IL_027c: Unknown result type (might be due to invalid IL or missing references)
//IL_0283: Unknown result type (might be due to invalid IL or missing references)
//IL_0185: Unknown result type (might be due to invalid IL or missing references)
//IL_018a: Unknown result type (might be due to invalid IL or missing references)
//IL_019e: Unknown result type (might be due to invalid IL or missing references)
//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)_localPawn == (Object)null) && !((Object)(object)_frogInstance == (Object)null) && !((Object)(object)_frogRb == (Object)null))
{
Vector3 forward = Vector3.forward;
Vector3 right = Vector3.right;
Transform cameraTransform = GetCameraTransform();
if ((Object)(object)cameraTransform != (Object)null)
{
forward = cameraTransform.forward;
right = cameraTransform.right;
}
forward.y = 0f;
right.y = 0f;
((Vector3)(ref forward)).Normalize();
((Vector3)(ref right)).Normalize();
Vector3 val = right * _moveInput.x + forward * _moveInput.y;
float num = Mathf.Clamp01(((Vector3)(ref val)).magnitude);
if (num > 0.001f)
{
((Vector3)(ref val)).Normalize();
}
_desiredDir = val;
if (num > 0.001f)
{
Quaternion val2 = Quaternion.LookRotation(val, Vector3.up);
_frogInstance.transform.rotation = Quaternion.Slerp(_frogInstance.transform.rotation, val2, Time.fixedDeltaTime * _turnSpeed);
}
bool num2 = IsGroundedNotSelfSphere(_frogRb.position);
bool flag = num2 || Time.time - _lastGroundedTime <= _groundCoyoteTime;
if (num2)
{
_lastGroundedTime = Time.time;
}
bool flag2 = num > 0.05f;
if (flag2 && flag && Time.time - _lastHopTime >= _hopCooldown)
{
_lastHopTime = Time.time;
Vector3 velocity = _frogRb.velocity;
velocity.y = 0f;
_frogRb.velocity = velocity;
_frogRb.AddForce(_desiredDir * _hopForwardImpulse, (ForceMode)1);
_frogRb.AddForce(Vector3.up * _hopUpImpulse, (ForceMode)1);
TryTriggerAnimator(_frogAnimator, "Hop");
TryTriggerAnimator(_frogAnimator, "Jump");
}
else if (!flag && flag2)
{
Vector3 velocity2 = _frogRb.velocity;
Vector3 val3 = default(Vector3);
((Vector3)(ref val3))..ctor(velocity2.x, 0f, velocity2.z);
Vector3 val4 = _desiredDir * _maxHorizontalSpeed;
val3 = Vector3.Lerp(val3, val4, _airControl * Time.fixedDeltaTime * 10f);
_frogRb.velocity = new Vector3(val3.x, velocity2.y, val3.z);
}
ApplyFrogAnimFromVelocity(_frogAnimator, _frogRb.velocity, flag);
}
}
private void MaintainRemoteFrogBinds()
{
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_023c: Unknown result type (might be due to invalid IL or missing references)
//IL_0241: Unknown result type (might be due to invalid IL or missing references)
//IL_0243: Unknown result type (might be due to invalid IL or missing references)
//IL_0247: Unknown result type (might be due to invalid IL or missing references)
//IL_024c: Unknown result type (might be due to invalid IL or missing references)
//IL_0256: Unknown result type (might be due to invalid IL or missing references)
//IL_025b: Unknown result type (might be due to invalid IL or missing references)
//IL_025f: Unknown result type (might be due to invalid IL or missing references)
//IL_0261: Unknown result type (might be due to invalid IL or missing references)
//IL_027d: Unknown result type (might be due to invalid IL or missing references)
if (!NetworkClient.active)
{
return;
}
foreach (NetworkIdentity value4 in NetworkClient.spawned.Values)
{
if (!((Object)(object)value4 == (Object)null) && !_remoteBinds.ContainsKey(value4.netId) && LooksLikeFrog(((Component)value4).gameObject) && !value4.isOwned)
{
GameObject gameObject = ((Component)value4).gameObject;
Rigidbody componentInChildren = gameObject.GetComponentInChildren<Rigidbody>(true);
Animator componentInChildren2 = gameObject.GetComponentInChildren<Animator>(true);
SetupAnimator(componentInChildren2);
_remoteBinds[value4.netId] = new RemoteBind
{
Frog = gameObject,
FrogNi = value4,
FrogRb = componentInChildren,
FrogAnimator = componentInChildren2,
LastPos = gameObject.transform.position
};
}
}
foreach (uint item in (from kv in _remoteBinds
where kv.Value == null || (Object)(object)kv.Value.Frog == (Object)null
select kv.Key).ToList())
{
if (_remoteBinds.TryGetValue(item, out RemoteBind value) && value != null && (Object)(object)value.Pawn != (Object)null)
{
HidePawnEverywhere(value.Pawn, hide: false);
}
_remoteBinds.Remove(item);
}
foreach (KeyValuePair<uint, RemoteBind> remoteBind in _remoteBinds)
{
RemoteBind value2 = remoteBind.Value;
if ((Object)(object)value2.Pawn == (Object)null)
{
if (_frogOwnerCache.TryGetValue(remoteBind.Key, out var value3))
{
value2.Pawn = FindPawnByNetId(value3);
}
if ((Object)(object)value2.Pawn == (Object)null)
{
value2.Pawn = TryGetControllingPawn(value2.Frog);
}
}
if ((Object)(object)value2.Pawn != (Object)null)
{
HidePawnEverywhere(value2.Pawn, hide: true);
}
Vector3 position = value2.Frog.transform.position;
Vector3 velocity = (position - value2.LastPos) / Time.deltaTime;
value2.LastPos = position;
bool groundedStable = IsGroundedRemote(value2.Frog);
ApplyFrogAnimFromVelocity(value2.FrogAnimator, velocity, groundedStable);
}
}
private void RegisterSerializers()
{
Writer<FrogRequestMessage>.write = delegate(NetworkWriter writer, FrogRequestMessage msg)
{
NetworkWriterExtensions.WriteBool(writer, msg.Transform);
};
Reader<FrogRequestMessage>.read = delegate(NetworkReader reader)
{
FrogRequestMessage result3 = default(FrogRequestMessage);
result3.Transform = NetworkReaderExtensions.ReadBool(reader);
return result3;
};
Writer<FrogAbilityMessage>.write = delegate(NetworkWriter writer, FrogAbilityMessage msg)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
NetworkWriterExtensions.WriteUInt(writer, msg.FrogNetId);
NetworkWriterExtensions.WriteVector3(writer, msg.Origin);
NetworkWriterExtensions.WriteVector3(writer, msg.Forward);
};
Reader<FrogAbilityMessage>.read = delegate(NetworkReader reader)
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
FrogAbilityMessage result2 = default(FrogAbilityMessage);
result2.FrogNetId = NetworkReaderExtensions.ReadUInt(reader);
result2.Origin = NetworkReaderExtensions.ReadVector3(reader);
result2.Forward = NetworkReaderExtensions.ReadVector3(reader);
return result2;
};
Writer<FrogLinkMessage>.write = delegate(NetworkWriter writer, FrogLinkMessage msg)
{
NetworkWriterExtensions.WriteUInt(writer, msg.FrogNetId);
NetworkWriterExtensions.WriteUInt(writer, msg.PawnNetId);
};
Reader<FrogLinkMessage>.read = delegate(NetworkReader reader)
{
FrogLinkMessage result = default(FrogLinkMessage);
result.FrogNetId = NetworkReaderExtensions.ReadUInt(reader);
result.PawnNetId = NetworkReaderExtensions.ReadUInt(reader);
return result;
};
}
private void RegisterClientHandlers()
{
NetworkClient.RegisterHandler<FrogLinkMessage>((Action<FrogLinkMessage>)OnClientReceiveLink, true);
NetworkClient.RegisterHandler<FrogAbilityMessage>((Action<FrogAbilityMessage>)OnClientReceiveAbility, true);
}
private void RegisterServerHandlers()
{
NetworkServer.RegisterHandler<FrogRequestMessage>((Action<NetworkConnectionToClient, FrogRequestMessage>)OnServerReceiveRequest, true);
NetworkServer.RegisterHandler<FrogAbilityMessage>((Action<NetworkConnectionToClient, FrogAbilityMessage>)OnServerReceiveAbility, true);
}
private void RequestTransform(bool intoFrog)
{
if ((Object)(object)_localPawn == (Object)null)
{
return;
}
if (NetworkServer.active)
{
if (intoFrog)
{
ServerSpawnFrogFor((NetworkConnection)(object)((NetworkBehaviour)_localPawn).connectionToClient, _localPawn);
}
else
{
ServerRevertFrogFor((NetworkConnection)(object)((NetworkBehaviour)_localPawn).connectionToClient);
}
}
else if (NetworkClient.isConnected)
{
FrogRequestMessage frogRequestMessage = default(FrogRequestMessage);
frogRequestMessage.Transform = intoFrog;
NetworkClient.Send<FrogRequestMessage>(frogRequestMessage, 0);
}
}
private void RequestAbility()
{
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)_frogInstance == (Object)null) && !(Time.time - _lastAbilityTime < _abilityCooldown))
{
_lastAbilityTime = Time.time;
PlaySpitAnim(_frogAnimator);
FrogAbilityMessage frogAbilityMessage = default(FrogAbilityMessage);
frogAbilityMessage.FrogNetId = _frogInstance.GetComponent<NetworkIdentity>().netId;
frogAbilityMessage.Origin = _frogInstance.transform.position;
frogAbilityMessage.Forward = _frogInstance.transform.forward;
FrogAbilityMessage frogAbilityMessage2 = frogAbilityMessage;
if (NetworkServer.active)
{
ServerDoAbility(frogAbilityMessage2.Origin, frogAbilityMessage2.Forward);
NetworkServer.SendToAll<FrogAbilityMessage>(frogAbilityMessage2, 0, false);
}
else
{
NetworkClient.Send<FrogAbilityMessage>(frogAbilityMessage2, 0);
}
}
}
private void OnServerReceiveRequest(NetworkConnectionToClient conn, FrogRequestMessage msg)
{
Pawn component = ((Component)((NetworkConnection)conn).identity).GetComponent<Pawn>();
if (!((Object)(object)component == (Object)null))
{
if (msg.Transform)
{
ServerSpawnFrogFor((NetworkConnection)(object)conn, component);
}
else
{
ServerRevertFrogFor((NetworkConnection)(object)conn);
}
}
}
private void OnServerReceiveAbility(NetworkConnectionToClient conn, FrogAbilityMessage msg)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
ServerDoAbility(msg.Origin, msg.Forward);
NetworkServer.SendToAll<FrogAbilityMessage>(msg, 0, false);
}
private void ServerSpawnFrogFor(NetworkConnection conn, Pawn pawn)
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Expected O, but got Unknown
if ((Object)(object)FindFrogForConnection(conn) != (Object)null)
{
return;
}
DungeonGameplay val = Object.FindObjectOfType<DungeonGameplay>();
if ((Object)(object)val == (Object)null)
{
return;
}
NetworkIdentity val2 = FindFrogPrefabNetworkIdentity(val);
if (!((Object)(object)val2 == (Object)null))
{
Vector3 val3 = ((Component)pawn).transform.position + ((Component)pawn).transform.forward * 1f + Vector3.up * 0.35f;
GameObject val4 = Object.Instantiate<GameObject>(((Component)val2).gameObject, val3, ((Component)pawn).transform.rotation);
NetworkServer.Spawn(val4, (NetworkConnectionToClient)conn);
FrogLinkMessage frogLinkMessage = default(FrogLinkMessage);
frogLinkMessage.FrogNetId = val4.GetComponent<NetworkIdentity>().netId;
frogLinkMessage.PawnNetId = ((Component)pawn).GetComponent<NetworkIdentity>().netId;
NetworkServer.SendToAll<FrogLinkMessage>(frogLinkMessage, 0, false);
if (conn == NetworkServer.localConnection)
{
SetupLocalFrog(val4);
}
}
}
private void ServerRevertFrogFor(NetworkConnection conn)
{
GameObject val = FindFrogForConnection(conn);
if ((Object)(object)val != (Object)null)
{
NetworkServer.Destroy(val);
}
if (conn == NetworkServer.localConnection)
{
RevertToPawn();
}
}
private void ServerDoAbility(Vector3 origin, Vector3 fwd)
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)_cachedCoinPrefab == (Object)null)
{
_cachedCoinPrefab = FindGoldPrefabRuntime();
}
if (!((Object)(object)_cachedCoinPrefab == (Object)null))
{
((MonoBehaviour)this).StartCoroutine(SpawnCoinsRoutineServer(origin, fwd));
}
}
[IteratorStateMachine(typeof(<SpawnCoinsRoutineServer>d__52))]
private IEnumerator SpawnCoinsRoutineServer(Vector3 origin, Vector3 fwd)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <SpawnCoinsRoutineServer>d__52(0)
{
<>4__this = this,
origin = origin,
fwd = fwd
};
}
private void OnClientReceiveLink(FrogLinkMessage msg)
{
_frogOwnerCache[msg.FrogNetId] = msg.PawnNetId;
}
private void OnClientReceiveAbility(FrogAbilityMessage msg)
{
if ((!((Object)(object)_frogInstance != (Object)null) || _frogInstance.GetComponent<NetworkIdentity>().netId != msg.FrogNetId) && NetworkClient.spawned.TryGetValue(msg.FrogNetId, out var value))
{
PlaySpitAnim(((Component)value).GetComponentInChildren<Animator>());
}
}
private void PlaySpitAnim(Animator anim)
{
if (!((Object)(object)anim == (Object)null))
{
TryTriggerAnimator(anim, "Drop item");
TryTriggerAnimator(anim, "DropItem");
TryTriggerAnimator(anim, "Attack");
anim.Play("DropItem");
}
}
private void TryAcquireLocalPawn()
{
if (!((Object)(object)_localPawn != (Object)null))
{
_localPawn = Pawn.LocalInstance;
}
}
private Transform GetCameraTransform()
{
if ((Object)(object)Camera.main != (Object)null)
{
return ((Component)Camera.main).transform;
}
return null;
}
private void SetPawnDormant(bool dormant)
{
if ((Object)(object)_localPawn == (Object)null)
{
return;
}
if ((Object)(object)_localPawn.CapsuleCollider != (Object)null)
{
((Collider)_localPawn.CapsuleCollider).enabled = !dormant;
}
if ((Object)(object)_localPawn.Rigidbody != (Object)null)
{
_localPawn.Rigidbody.isKinematic = dormant;
}
if ((Object)(object)_localPawn.ControllerStateMachine != (Object)null)
{
if (dormant)
{
((NetworkStateMachine<ControllerState>)(object)_localPawn.ControllerStateMachine).Pause();
}
else
{
((NetworkStateMachine<ControllerState>)(object)_localPawn.ControllerStateMachine).Resume();
}
}
}
private void HidePawnRenderersLocal(Pawn pawn, bool hide)
{
if ((Object)(object)pawn == (Object)null)
{
return;
}
try
{
Renderer[] componentsInChildren = ((Component)pawn).GetComponentsInChildren<Renderer>(true);
foreach (Renderer val in componentsInChildren)
{
if ((Object)(object)val != (Object)null)
{
val.enabled = !hide;
}
}
}
catch
{
}
}
private void HidePawnEverywhere(Pawn pawn, bool hide)
{
if ((Object)(object)pawn == (Object)null)
{
return;
}
try
{
PawnMaterial pawnMaterial = pawn.PawnMaterial;
if ((Object)(object)pawnMaterial != (Object)null)
{
MethodInfo method = ((object)pawnMaterial).GetType().GetMethod("SetVisibility", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
if (method != null)
{
method.Invoke(pawnMaterial, new object[1] { !hide });
}
}
}
catch
{
}
HidePawnRenderersLocal(pawn, hide);
}
private void ApplyFrogAnimFromVelocity(Animator anim, Vector3 velocity, bool groundedStable)
{
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)anim == (Object)null) && ((Behaviour)anim).isActiveAndEnabled)
{
Vector3 val = new Vector3(velocity.x, 0f, velocity.z);
bool flag = ((Vector3)(ref val)).magnitude > 0.2f;
bool flag2 = !groundedStable && Mathf.Abs(velocity.y) > _ungroundVelThreshold;
anim.SetBool("Moving", flag);
anim.SetBool("Ungrounded", flag2);
anim.SetFloat("Speed", flag ? 1f : 0f);
}
}
private bool IsGroundedNotSelfSphere(Vector3 pos)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return IsGroundedFallbackRay(pos);
}
private bool IsGroundedFallbackRay(Vector3 pos)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
return Physics.Raycast(pos + Vector3.up * 0.25f, Vector3.down, 0.9f, -1, (QueryTriggerInteraction)1);
}
private void DisableAIMovers(GameObject frog)
{
try
{
Component[] componentsInChildren;
if (_npcAIAgentType != null)
{
componentsInChildren = frog.GetComponentsInChildren(_npcAIAgentType, true);
foreach (Component obj in componentsInChildren)
{
Behaviour val = (Behaviour)(object)((obj is Behaviour) ? obj : null);
if (val != null)
{
val.enabled = false;
}
}
}
componentsInChildren = frog.GetComponentsInChildren(_navMeshAgentType, true);
foreach (Component obj2 in componentsInChildren)
{
Behaviour val2 = (Behaviour)(object)((obj2 is Behaviour) ? obj2 : null);
if (val2 != null)
{
val2.enabled = false;
}
}
NpcBehaviour component = frog.GetComponent<NpcBehaviour>();
if ((Object)(object)component != (Object)null)
{
((Behaviour)component).enabled = false;
}
}
catch
{
}
}
private bool TryTriggerAnimator(Animator anim, string trigger)
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Invalid comparison between Unknown and I4
if ((Object)(object)anim == (Object)null)
{
return false;
}
AnimatorControllerParameter[] parameters = anim.parameters;
foreach (AnimatorControllerParameter val in parameters)
{
if ((int)val.type == 9 && val.name.Equals(trigger, StringComparison.OrdinalIgnoreCase))
{
anim.SetTrigger(val.name);
return true;
}
}
return false;
}
private void SetupAnimator(Animator anim)
{
if (!((Object)(object)anim == (Object)null))
{
anim.cullingMode = (AnimatorCullingMode)0;
anim.applyRootMotion = false;
}
}
private NetworkIdentity FindFrogPrefabNetworkIdentity(DungeonGameplay dg)
{
Type type = ((object)dg).GetType();
BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
FieldInfo fieldInfo = type.GetField("frogNpcPrefab", bindingAttr) ?? type.GetField("_frogNpcPrefab", bindingAttr);
if (fieldInfo != null)
{
object? value = fieldInfo.GetValue(dg);
return (NetworkIdentity)((value is NetworkIdentity) ? value : null);
}
return ((IEnumerable<NetworkIdentity>)Resources.FindObjectsOfTypeAll<NetworkIdentity>()).FirstOrDefault((Func<NetworkIdentity, bool>)((NetworkIdentity x) => ((Object)x).name.Contains("Frog")));
}
private GameObject FindGoldPrefabRuntime()
{
foreach (KeyValuePair<uint, GameObject> prefab in NetworkClient.prefabs)
{
if ((Object)(object)prefab.Value != (Object)null && ((Object)prefab.Value).name.ToLower().Contains("gold"))
{
return prefab.Value;
}
}
return null;
}
private static Type AccessType(string fullName)
{
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
for (int i = 0; i < assemblies.Length; i++)
{
Type type = assemblies[i].GetType(fullName, throwOnError: false);
if (type != null)
{
return type;
}
}
return null;
}
private bool LooksLikeFrog(GameObject go)
{
if ((Object)(object)go == (Object)null)
{
return false;
}
return ((Object)go).name.IndexOf("frog", StringComparison.OrdinalIgnoreCase) >= 0;
}
private GameObject FindFrogForConnection(NetworkConnection conn)
{
NetworkIdentity[] array = Object.FindObjectsOfType<NetworkIdentity>();
foreach (NetworkIdentity val in array)
{
if (val.connectionToClient == conn && LooksLikeFrog(((Component)val).gameObject))
{
return ((Component)val).gameObject;
}
}
return null;
}
private Pawn TryGetControllingPawn(GameObject frog)
{
return null;
}
private Pawn FindPawnByNetId(uint netId)
{
return ((IEnumerable<Pawn>)Object.FindObjectsOfType<Pawn>()).FirstOrDefault((Func<Pawn, bool>)delegate(Pawn p)
{
NetworkIdentity component = ((Component)p).GetComponent<NetworkIdentity>();
return component != null && component.netId == netId;
});
}
private bool IsGroundedRemote(GameObject frog)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
return Physics.Raycast(frog.transform.position + Vector3.up * 0.25f, Vector3.down, 0.9f, -1, (QueryTriggerInteraction)1);
}
}
public struct FrogRequestMessage : NetworkMessage
{
public bool Transform;
}
public struct FrogAbilityMessage : NetworkMessage
{
public uint FrogNetId;
public Vector3 Origin;
public Vector3 Forward;
}
public struct FrogLinkMessage : NetworkMessage
{
public uint FrogNetId;
public uint PawnNetId;
}
}
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class ConstantExpectedAttribute : Attribute
{
public object? Min { get; set; }
public object? Max { get; set; }
}
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class ExperimentalAttribute : Attribute
{
public string DiagnosticId { get; }
public string? UrlFormat { get; set; }
public ExperimentalAttribute(string diagnosticId)
{
DiagnosticId = diagnosticId;
}
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
[ExcludeFromCodeCoverage]
internal sealed class MemberNotNullAttribute : Attribute
{
public string[] Members { get; }
public MemberNotNullAttribute(string member)
{
Members = new string[1] { member };
}
public MemberNotNullAttribute(params string[] members)
{
Members = members;
}
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
[ExcludeFromCodeCoverage]
internal sealed class MemberNotNullWhenAttribute : Attribute
{
public bool ReturnValue { get; }
public string[] Members { get; }
public MemberNotNullWhenAttribute(bool returnValue, string member)
{
ReturnValue = returnValue;
Members = new string[1] { member };
}
public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
{
ReturnValue = returnValue;
Members = members;
}
}
[AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class SetsRequiredMembersAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class StringSyntaxAttribute : Attribute
{
public const string CompositeFormat = "CompositeFormat";
public const string DateOnlyFormat = "DateOnlyFormat";
public const string DateTimeFormat = "DateTimeFormat";
public const string EnumFormat = "EnumFormat";
public const string GuidFormat = "GuidFormat";
public const string Json = "Json";
public const string NumericFormat = "NumericFormat";
public const string Regex = "Regex";
public const string TimeOnlyFormat = "TimeOnlyFormat";
public const string TimeSpanFormat = "TimeSpanFormat";
public const string Uri = "Uri";
public const string Xml = "Xml";
public string Syntax { get; }
public object?[] Arguments { get; }
public StringSyntaxAttribute(string syntax)
{
Syntax = syntax;
Arguments = new object[0];
}
public StringSyntaxAttribute(string syntax, params object?[] arguments)
{
Syntax = syntax;
Arguments = arguments;
}
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class UnscopedRefAttribute : Attribute
{
}
}
namespace System.Runtime.Versioning
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class RequiresPreviewFeaturesAttribute : Attribute
{
public string? Message { get; }
public string? Url { get; set; }
public RequiresPreviewFeaturesAttribute()
{
}
public RequiresPreviewFeaturesAttribute(string? message)
{
Message = message;
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class CallerArgumentExpressionAttribute : Attribute
{
public string ParameterName { get; }
public CallerArgumentExpressionAttribute(string parameterName)
{
ParameterName = parameterName;
}
}
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class CollectionBuilderAttribute : Attribute
{
public Type BuilderType { get; }
public string MethodName { get; }
public CollectionBuilderAttribute(Type builderType, string methodName)
{
BuilderType = builderType;
MethodName = methodName;
}
}
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class CompilerFeatureRequiredAttribute : Attribute
{
public const string RefStructs = "RefStructs";
public const string RequiredMembers = "RequiredMembers";
public string FeatureName { get; }
public bool IsOptional { get; set; }
public CompilerFeatureRequiredAttribute(string featureName)
{
FeatureName = featureName;
}
}
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute
{
public string[] Arguments { get; }
public InterpolatedStringHandlerArgumentAttribute(string argument)
{
Arguments = new string[1] { argument };
}
public InterpolatedStringHandlerArgumentAttribute(params string[] arguments)
{
Arguments = arguments;
}
}
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class InterpolatedStringHandlerAttribute : Attribute
{
}
[EditorBrowsable(EditorBrowsableState.Never)]
[ExcludeFromCodeCoverage]
internal static class IsExternalInit
{
}
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class ModuleInitializerAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class OverloadResolutionPriorityAttribute : Attribute
{
public int Priority { get; }
public OverloadResolutionPriorityAttribute(int priority)
{
Priority = priority;
}
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
[ExcludeFromCodeCoverage]
internal sealed class ParamCollectionAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class RequiredMemberAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
[EditorBrowsable(EditorBrowsableState.Never)]
[ExcludeFromCodeCoverage]
internal sealed class RequiresLocationAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface, Inherited = false)]
[ExcludeFromCodeCoverage]
internal sealed class SkipLocalsInitAttribute : Attribute
{
}
}