Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of CoreWoodExtras v2.2.2
plugins/CoreWoodExtras.dll
Decompiled 4 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using CoreWoodExtras; using CoreWoodExtras.Containers; using CoreWoodExtras.TextureUtils; using CoreWoodExtras.Updates; using HarmonyLib; using Jotunn; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Extensions; using Jotunn.Managers; using Jotunn.Utils; using Microsoft.CodeAnalysis; using TMPro; using UnityEngine; using UnityEngine.Networking; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("CoreWoodExtras")] [assembly: AssemblyDescription("https://www.nexusmods.com/profile/MagicMikeMods/mods")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("MagicMike")] [assembly: AssemblyProduct("CoreWoodExtras")] [assembly: AssemblyCopyright("Copyright © MagicMike 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("e3243d22-4307-4008-ba36-9f326008cde5")] [assembly: AssemblyFileVersion("2.2.2")] [assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.2.2.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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; } } } public class Elevator : MonoBehaviour { public bool m_canMove = true; public float m_speed = 2f; public int m_startPoint; public Transform[] m_points; private int i; private bool m_reverse; public static readonly int m_elevatorPosition = StringExtensionMethods.GetStableHashCode("elevatorPosition"); private string m_name; private ZNetView m_nview; public void Start() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) m_name = ((Object)((Component)this).gameObject.GetComponentInParent<Piece>()).name; m_nview = ((Component)this).gameObject.GetComponentInParent<ZNetView>(); if ((Object)(object)m_nview != (Object)null && m_nview.GetZDO() != null) { i = m_nview.GetZDO().GetInt(m_elevatorPosition, 0); ((Component)this).transform.position = m_points[i].position; } else { ((Component)this).transform.position = m_points[m_startPoint].position; i = m_startPoint; } } public void Update() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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) if (Vector3.Distance(((Component)this).transform.position, m_points[i].position) < 0.01f) { m_canMove = false; if (i == m_points.Length - 1) { m_reverse = true; i--; return; } if (i == 0) { m_reverse = false; i++; return; } if (m_reverse) { i--; } else { i++; } } if (m_canMove) { ((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, m_points[i].position, m_speed * Time.deltaTime); m_nview.GetZDO().Set(m_elevatorPosition, i, false); } } } public class ElevatorSwitch : MonoBehaviour, Hoverable, Interactable { public Elevator m_elevator; public EffectList m_elevatorSFX; public float m_hoverOffset; private string m_name; private Piece m_piece; private void Start() { m_piece = ((Component)this).gameObject.GetComponentInParent<Piece>(); m_name = m_piece.m_name; } public string GetHoverText() { return Localization.instance.Localize(m_name + "\n[<color=yellow><b>$KEY_Use</b></color>] $text_use_elevator"); } public string GetHoverName() { return m_name; } public bool Interact(Humanoid human, bool hold, bool alt) { //IL_003c: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (hold) { return false; } if (m_elevator.m_canMove) { return true; } m_elevator.m_speed = 2f; m_elevator.m_canMove = true; m_elevatorSFX.Create(((Component)this).transform.position, ((Component)this).transform.rotation, (Transform)null, 1f, -1, default(ZDOID)); return true; } public bool UseItem(Humanoid user, ItemData item) { return false; } public float GetHoverOffset() { return m_hoverOffset; } } public class KeyUtils { public static bool IgnoreKeyPresses(bool extra = false) { if (!extra) { if (!((Object)(object)ZNetScene.instance == (Object)null) && !((Object)(object)Player.m_localPlayer == (Object)null) && !Minimap.IsOpen() && !Console.IsVisible() && !TextInput.IsVisible() && !ZNet.instance.InPasswordDialog()) { Chat instance = Chat.instance; if (instance == null) { return false; } return instance.HasFocus(); } return true; } if (!((Object)(object)ZNetScene.instance == (Object)null) && !((Object)(object)Player.m_localPlayer == (Object)null) && !Minimap.IsOpen() && !Console.IsVisible() && !TextInput.IsVisible() && !ZNet.instance.InPasswordDialog()) { Chat instance2 = Chat.instance; if ((instance2 == null || !instance2.HasFocus()) && !StoreGui.IsVisible() && !InventoryGui.IsVisible() && !Menu.IsVisible()) { TextViewer instance3 = TextViewer.instance; if (instance3 == null) { return false; } return instance3.IsVisible(); } } return true; } public static bool CheckKeyDown(string value) { try { string[] array = value.Split(new char[1] { ',' }); for (int i = 0; i < array.Length; i++) { if (Input.GetKeyDown(array[i].ToLower())) { return true; } } } catch { } return false; } public static bool CheckKeyUp(string value) { try { string[] array = value.Split(new char[1] { ',' }); for (int i = 0; i < array.Length; i++) { if (Input.GetKeyUp(array[i].ToLower())) { return true; } } } catch { } return false; } public static bool CheckKeyHeld(string value, bool req = true) { try { string[] array = value.Split(new char[1] { ',' }); for (int i = 0; i < array.Length; i++) { if (Input.GetKey(array[i].ToLower())) { return true; } } } catch { } return !req; } } public class ParentPlatform : MonoBehaviour { private Piece m_piece; private void Start() { m_piece = ((Component)this).gameObject.GetComponentInParent<Piece>(); } private void OnCollisionEnter(Collision other) { other.transform.SetParent(((Component)this).transform); other.gameObject.GetComponent<Rigidbody>().interpolation = (RigidbodyInterpolation)0; m_piece.m_canBeRemoved = false; } private void OnCollisionExit(Collision other) { other.transform.SetParent((Transform)null); other.gameObject.GetComponent<Rigidbody>().interpolation = (RigidbodyInterpolation)1; m_piece.m_canBeRemoved = true; } } public class SchoolBubbles : MonoBehaviour { public ParticleSystem _bubbleParticles; public float _emitEverySecond = 0.01f; public float _speedEmitMultiplier = 0.25f; public int _minBubbles; public int _maxBubbles = 5; public void Start() { if ((Object)(object)_bubbleParticles == (Object)null) { ((Component)((Component)this).transform).GetComponent<ParticleSystem>(); } } public void EmitBubbles(Vector3 pos, float amount) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) if (!(amount * _speedEmitMultiplier < 1f)) { ((Component)_bubbleParticles).transform.position = pos; _bubbleParticles.Emit(Mathf.Clamp((int)(amount * _speedEmitMultiplier), _minBubbles, _maxBubbles)); } } } public class SchoolChild : MonoBehaviour { public SchoolController _spawner; private Vector3 _wayPoint; [HideInInspector] public float _speed = 10f; private float _stuckCounter; private float _damping; private Transform _model; private float _targetSpeed; private float tParam; private float _rotateCounterR; private float _rotateCounterL; public Transform _scanner; private bool _scan = true; private bool _instantiated; private static int _updateNextSeed; private int _updateSeed = -1; public Transform _cacheTransform; private Animation _legacyAnim; private Animator anim; public void Start() { _cacheTransform = ((Component)this).transform; LocateRequiredChildren(); if (_spawner._useLegacyAnimations) { _legacyAnim = ((Component)_model).GetComponent<Animation>(); } else { anim = ((Component)_model).GetComponent<Animator>(); } SetRandomScale(); RandomizeStartAnimationFrame(); _speed = Random.Range(_spawner._minSpeed, _spawner._maxSpeed); Wander(0f); SetRandomWaypoint(); CheckForBubblesThenInvoke(); _instantiated = true; GetStartPos(); FrameSkipSeedInit(); _spawner._activeChildren++; } public void childUpdate() { CheckForDistanceToWaypoint(); RotationBasedOnWaypointOrAvoidance(); ForwardMovement(); RayCastToPushAwayFromObstacles(); SetAnimationSpeed(); } public void FrameSkipSeedInit() { if (_spawner._updateDivisor > 1) { int num = _spawner._updateDivisor - 1; _updateNextSeed++; _updateSeed = _updateNextSeed; _updateNextSeed %= num; } } public void CheckForBubblesThenInvoke() { if ((Object)(object)_spawner._bubbles != (Object)null) { ((MonoBehaviour)this).InvokeRepeating("EmitBubbles", _spawner._bubbles._emitEverySecond * Random.value + 1f, _spawner._bubbles._emitEverySecond); } } public void EmitBubbles() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) _spawner._bubbles.EmitBubbles(_cacheTransform.position, _speed); } public void OnDisable() { ((MonoBehaviour)this).CancelInvoke(); _spawner._activeChildren--; } public void OnEnable() { if (_instantiated) { CheckForBubblesThenInvoke(); _spawner._activeChildren++; } } public void LocateRequiredChildren() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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) if ((Object)(object)_model == (Object)null) { _model = _cacheTransform.Find("Model"); } if ((Object)(object)_scanner == (Object)null) { _scanner = new GameObject().transform; _scanner.parent = ((Component)this).transform; _scanner.localRotation = Quaternion.identity; _scanner.localPosition = Vector3.zero; } } public void SkewModelForLessUniformedMovement() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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) Quaternion identity = Quaternion.identity; ((Quaternion)(ref identity)).eulerAngles = new Vector3(0f, 0f, (float)Random.Range(-25, 25)); _model.rotation = identity; } public void SetRandomScale() { //IL_0022: 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) float num = Random.Range(_spawner._minScale, _spawner._maxScale); _cacheTransform.localScale = Vector3.one * num; } public void RandomizeStartAnimationFrame() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown if (!_spawner._useLegacyAnimations) { return; } foreach (AnimationState item in _legacyAnim) { AnimationState val = item; val.time = Random.value * val.length; } } public void SetAnimationSpeed() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (_spawner._useLegacyAnimations) { foreach (AnimationState item in _legacyAnim) { item.speed = Random.Range(_spawner._minAnimationSpeed, _spawner._maxAnimationSpeed) * _spawner._schoolSpeed * _speed + 0.1f; } return; } anim.speed = Random.Range(_spawner._minAnimationSpeed, _spawner._maxAnimationSpeed) * _spawner._schoolSpeed * _speed + 0.1f; } public void GetStartPos() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) _cacheTransform.position = _wayPoint - new Vector3(0.1f, 0.1f, 0.1f); } public Vector3 findWaypoint() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) Vector3 zero = Vector3.zero; zero.x = Random.Range(0f - _spawner._spawnSphere, _spawner._spawnSphere) + _spawner._posBuffer.x; zero.z = Random.Range(0f - _spawner._spawnSphereDepth, _spawner._spawnSphereDepth) + _spawner._posBuffer.z; zero.y = Random.Range(0f - _spawner._spawnSphereHeight, _spawner._spawnSphereHeight) + _spawner._posBuffer.y; return zero; } public void RayCastToPushAwayFromObstacles() { if (_spawner._push) { RotateScanner(); RayCastToPushAwayFromObstaclesCheckForCollision(); } } public void RayCastToPushAwayFromObstaclesCheckForCollision() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_009f: 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); float num = 0f; Vector3 forward = _scanner.forward; if (Physics.Raycast(_cacheTransform.position, forward, ref val, _spawner._pushDistance, LayerMask.op_Implicit(_spawner._avoidanceMask))) { SchoolChild component = ((Component)((RaycastHit)(ref val)).transform).GetComponent<SchoolChild>(); num = (_spawner._pushDistance - ((RaycastHit)(ref val)).distance) / _spawner._pushDistance; if ((Object)(object)component != (Object)null) { Transform cacheTransform = _cacheTransform; cacheTransform.position -= forward * _spawner._newDelta * num * _spawner._pushForce; return; } _speed -= 0.01f * _spawner._newDelta; if (_speed < 0.1f) { _speed = 0.1f; } Transform cacheTransform2 = _cacheTransform; cacheTransform2.position -= forward * _spawner._newDelta * num * _spawner._pushForce * 2f; _scan = false; } else { _scan = true; } } public void RotateScanner() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) if (_scan) { _scanner.rotation = Random.rotation; } else { _scanner.Rotate(new Vector3(150f * _spawner._newDelta, 0f, 0f)); } } public bool Avoidance() { //IL_0011: 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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_0101: 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_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_0253: 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_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) if (!_spawner._avoidance) { return false; } RaycastHit val = default(RaycastHit); float num = 0f; Quaternion rotation = _cacheTransform.rotation; Quaternion rotation2 = _cacheTransform.rotation; Vector3 eulerAngles = ((Quaternion)(ref rotation2)).eulerAngles; Vector3 forward = _cacheTransform.forward; Vector3 right = _cacheTransform.right; if (Physics.Raycast(_cacheTransform.position, -Vector3.up + forward * 0.1f, ref val, _spawner._avoidDistance, LayerMask.op_Implicit(_spawner._avoidanceMask))) { num = (_spawner._avoidDistance - ((RaycastHit)(ref val)).distance) / _spawner._avoidDistance; eulerAngles.x -= _spawner._avoidSpeed * num * _spawner._newDelta * (_speed + 1f); ((Quaternion)(ref rotation)).eulerAngles = eulerAngles; _cacheTransform.rotation = rotation; } if (Physics.Raycast(_cacheTransform.position, Vector3.up + forward * 0.1f, ref val, _spawner._avoidDistance, LayerMask.op_Implicit(_spawner._avoidanceMask))) { num = (_spawner._avoidDistance - ((RaycastHit)(ref val)).distance) / _spawner._avoidDistance; eulerAngles.x += _spawner._avoidSpeed * num * _spawner._newDelta * (_speed + 1f); ((Quaternion)(ref rotation)).eulerAngles = eulerAngles; _cacheTransform.rotation = rotation; } if (Physics.Raycast(_cacheTransform.position, forward + right * Random.Range(-0.1f, 0.1f), ref val, _spawner._stopDistance, LayerMask.op_Implicit(_spawner._avoidanceMask))) { num = (_spawner._stopDistance - ((RaycastHit)(ref val)).distance) / _spawner._stopDistance; eulerAngles.y -= _spawner._avoidSpeed * num * _spawner._newDelta * (_targetSpeed + 3f); ((Quaternion)(ref rotation)).eulerAngles = eulerAngles; _cacheTransform.rotation = rotation; _speed -= num * _spawner._newDelta * _spawner._stopSpeedMultiplier * _speed; if (_speed < 0.01f) { _speed = 0.01f; } return true; } if (Physics.Raycast(_cacheTransform.position, forward + right * (_spawner._avoidAngle + _rotateCounterL), ref val, _spawner._avoidDistance, LayerMask.op_Implicit(_spawner._avoidanceMask))) { num = (_spawner._avoidDistance - ((RaycastHit)(ref val)).distance) / _spawner._avoidDistance; _rotateCounterL += 0.1f; eulerAngles.y -= _spawner._avoidSpeed * num * _spawner._newDelta * _rotateCounterL * (_speed + 1f); ((Quaternion)(ref rotation)).eulerAngles = eulerAngles; _cacheTransform.rotation = rotation; if (_rotateCounterL > 1.5f) { _rotateCounterL = 1.5f; } _rotateCounterR = 0f; return true; } if (Physics.Raycast(_cacheTransform.position, forward + right * (0f - (_spawner._avoidAngle + _rotateCounterR)), ref val, _spawner._avoidDistance, LayerMask.op_Implicit(_spawner._avoidanceMask))) { num = (_spawner._avoidDistance - ((RaycastHit)(ref val)).distance) / _spawner._avoidDistance; if (((RaycastHit)(ref val)).point.y < _cacheTransform.position.y) { eulerAngles.y -= _spawner._avoidSpeed * num * _spawner._newDelta * (_speed + 1f); } else { eulerAngles.x += _spawner._avoidSpeed * num * _spawner._newDelta * (_speed + 1f); } _rotateCounterR += 0.1f; eulerAngles.y += _spawner._avoidSpeed * num * _spawner._newDelta * _rotateCounterR * (_speed + 1f); ((Quaternion)(ref rotation)).eulerAngles = eulerAngles; _cacheTransform.rotation = rotation; if (_rotateCounterR > 1.5f) { _rotateCounterR = 1.5f; } _rotateCounterL = 0f; return true; } _rotateCounterL = 0f; _rotateCounterR = 0f; return false; } public void ForwardMovement() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) Transform cacheTransform = _cacheTransform; cacheTransform.position += _cacheTransform.TransformDirection(Vector3.forward) * _speed * _spawner._newDelta; if (tParam < 1f) { if (_speed > _targetSpeed) { tParam += _spawner._newDelta * _spawner._acceleration; } else { tParam += _spawner._newDelta * _spawner._brake; } _speed = Mathf.Lerp(_speed, _targetSpeed, tParam); } } public void RotationBasedOnWaypointOrAvoidance() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_008a: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) Quaternion identity = Quaternion.identity; identity = Quaternion.LookRotation(_wayPoint - _cacheTransform.position); if (!Avoidance()) { _cacheTransform.rotation = Quaternion.Slerp(_cacheTransform.rotation, identity, _spawner._newDelta * _damping); } float x = _cacheTransform.localEulerAngles.x; x = ((x > 180f) ? (x - 360f) : x); Quaternion rotation = _cacheTransform.rotation; Vector3 eulerAngles = ((Quaternion)(ref rotation)).eulerAngles; eulerAngles.x = ClampAngle(x, -50f, 50f); ((Quaternion)(ref rotation)).eulerAngles = eulerAngles; _cacheTransform.rotation = rotation; } public void CheckForDistanceToWaypoint() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) Vector3 val = _cacheTransform.position - _wayPoint; if (((Vector3)(ref val)).magnitude < _spawner._waypointDistance + _stuckCounter) { Wander(0f); _stuckCounter = 0f; CheckIfThisShouldTriggerNewFlockWaypoint(); } else { _stuckCounter += _spawner._newDelta * (_spawner._waypointDistance * 0.25f); } } public void CheckIfThisShouldTriggerNewFlockWaypoint() { if (_spawner._childTriggerPos) { _spawner.SetRandomWaypointPosition(); } } public static float ClampAngle(float angle, float min, float max) { if (angle < -360f) { angle += 360f; } if (angle > 360f) { angle -= 360f; } return Mathf.Clamp(angle, min, max); } public void Wander(float delay) { _damping = Random.Range(_spawner._minDamping, _spawner._maxDamping); _targetSpeed = Random.Range(_spawner._minSpeed, _spawner._maxSpeed) * _spawner._speedCurveMultiplier.Evaluate(Random.value) * _spawner._schoolSpeed; ((MonoBehaviour)this).Invoke("SetRandomWaypoint", delay); } public void SetRandomWaypoint() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) tParam = 0f; _wayPoint = findWaypoint(); } } public class SchoolController : MonoBehaviour { public SchoolChild[] _childPrefab; public bool _groupChildToNewTransform; public Transform _groupTransform; public string _groupName = ""; public bool _groupChildToSchool; public int _childAmount = 250; public float _spawnSphere = 3f; public float _spawnSphereDepth = 3f; public float _spawnSphereHeight = 1.5f; public float _childSpeedMultipler = 2f; public float _minSpeed = 6f; public float _maxSpeed = 10f; public AnimationCurve _speedCurveMultiplier = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 1f), new Keyframe(1f, 1f) }); public float _minScale = 0.7f; public float _maxScale = 1f; public float _minDamping = 1f; public float _maxDamping = 2f; public float _waypointDistance = 1f; public float _minAnimationSpeed = 2f; public float _maxAnimationSpeed = 4f; public float _randomPositionTimerMax = 10f; public float _randomPositionTimerMin = 4f; public float _acceleration = 0.025f; public float _brake = 0.01f; public float _positionSphere = 25f; public float _positionSphereDepth = 5f; public float _positionSphereHeight = 5f; public bool _childTriggerPos; public bool _forceChildWaypoints; public bool _autoRandomPosition; public float _forcedRandomDelay = 1.5f; public float _schoolSpeed; public List<SchoolChild> _roamers; public Vector3 _posBuffer; public Vector3 _posOffset; public bool _avoidance; public float _avoidAngle = 0.35f; public float _avoidDistance = 1f; public float _avoidSpeed = 75f; public float _stopDistance = 0.5f; public float _stopSpeedMultiplier = 2f; public LayerMask _avoidanceMask = LayerMask.op_Implicit(-1); public bool _push; public float _pushDistance; public float _pushForce = 5f; public SchoolBubbles _bubbles; public int _updateDivisor = 1; public float _newDelta; public int _updateCounter; public int _activeChildren; public bool _useLegacyAnimations = true; public void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //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) _posBuffer = ((Component)this).transform.position + _posOffset; _schoolSpeed = Random.Range(1f, _childSpeedMultipler); AddFish(_childAmount); ((MonoBehaviour)this).Invoke("AutoRandomWaypointPosition", RandomWaypointTime()); } public void Update() { if (_activeChildren > 0) { if (_updateDivisor > 1) { _updateCounter++; _updateCounter %= _updateDivisor; _newDelta = Time.deltaTime * (float)_updateDivisor; } else { _newDelta = Time.deltaTime; } UpdateFishAmount(); for (int i = 0; i < _roamers.Count; i++) { _roamers[i].childUpdate(); } } } public void InstantiateGroup() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_groupTransform != (Object)null)) { GameObject val = new GameObject(); _groupTransform = val.transform; _groupTransform.position = ((Component)this).transform.position; if (_groupName != "") { ((Object)val).name = _groupName; } else { ((Object)val).name = ((Object)((Component)this).transform).name + " Fish Container"; } } } public void AddFish(int amount) { if (_groupChildToNewTransform) { InstantiateGroup(); } for (int i = 0; i < amount; i++) { int num = Random.Range(0, _childPrefab.Length); SchoolChild schoolChild = Object.Instantiate<SchoolChild>(_childPrefab[num]); schoolChild._spawner = this; _roamers.Add(schoolChild); AddChildToParent(((Component)schoolChild).transform); } } public void AddChildToParent(Transform obj) { if (_groupChildToSchool) { obj.parent = ((Component)this).transform; } else if (_groupChildToNewTransform) { obj.parent = _groupTransform; } } public void RemoveFish(int amount) { SchoolChild schoolChild = _roamers[_roamers.Count - 1]; _roamers.RemoveAt(_roamers.Count - 1); Object.Destroy((Object)(object)((Component)schoolChild).gameObject); } public void UpdateFishAmount() { if (_childAmount >= 0 && _childAmount < _roamers.Count) { RemoveFish(1); } else if (_childAmount > _roamers.Count) { AddFish(1); } } public void SetRandomWaypointPosition() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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) //IL_006a: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) _schoolSpeed = Random.Range(1f, _childSpeedMultipler); Vector3 zero = Vector3.zero; zero.x = Random.Range(0f - _positionSphere, _positionSphere) + ((Component)this).transform.position.x; zero.z = Random.Range(0f - _positionSphereDepth, _positionSphereDepth) + ((Component)this).transform.position.z; zero.y = Random.Range(0f - _positionSphereHeight, _positionSphereHeight) + ((Component)this).transform.position.y; _posBuffer = zero; if (_forceChildWaypoints) { for (int i = 0; i < _roamers.Count; i++) { _roamers[i].Wander(Random.value * _forcedRandomDelay); } } } public void AutoRandomWaypointPosition() { if (_autoRandomPosition && _activeChildren > 0) { SetRandomWaypointPosition(); } ((MonoBehaviour)this).CancelInvoke("AutoRandomWaypointPosition"); ((MonoBehaviour)this).Invoke("AutoRandomWaypointPosition", RandomWaypointTime()); } public float RandomWaypointTime() { return Random.Range(_randomPositionTimerMin, _randomPositionTimerMax); } public void OnDrawGizmos() { //IL_0046: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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) if (!Application.isPlaying && _posBuffer != ((Component)this).transform.position + _posOffset) { _posBuffer = ((Component)this).transform.position + _posOffset; } Gizmos.color = Color.blue; Gizmos.DrawWireCube(_posBuffer, new Vector3(_spawnSphere * 2f, _spawnSphereHeight * 2f, _spawnSphereDepth * 2f)); Gizmos.color = Color.cyan; Gizmos.DrawWireCube(((Component)this).transform.position, new Vector3(_positionSphere * 2f + _spawnSphere * 2f, _positionSphereHeight * 2f + _spawnSphereHeight * 2f, _positionSphereDepth * 2f + _spawnSphereDepth * 2f)); } } public class TriggerPlatform : MonoBehaviour { public Elevator m_platform; private void OnTriggerEnter(Collider other) { if (MainConfig.autoTriggers.Value) { m_platform.m_speed = 2f; m_platform.m_canMove = true; } } } public class WaypointMover : MonoBehaviour { [SerializeField] private Waypoints waypoints; [Range(0f, 10f)] [SerializeField] private float moveSpeed = 5f; [Range(0f, 20f)] [SerializeField] private float rotateSpeed = 0.5f; [SerializeField] private float distanceThreshold = 0.1f; private Transform currentWaypoint; private Quaternion rotationGoal; private Vector3 directionToWaypoint; private void Start() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) currentWaypoint = waypoints.GetNextWaypoint(currentWaypoint); ((Component)this).transform.position = currentWaypoint.position; currentWaypoint = waypoints.GetNextWaypoint(currentWaypoint); ((Component)this).transform.LookAt(currentWaypoint); } private void Update() { //IL_000c: 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_0028: 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_0043: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, currentWaypoint.position, moveSpeed * Time.deltaTime); if (Vector3.Distance(((Component)this).transform.position, currentWaypoint.position) < distanceThreshold) { currentWaypoint = waypoints.GetNextWaypoint(currentWaypoint); } RotateTowardsWaypoint(); } private void RotateTowardsWaypoint() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //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_001c: 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) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_005d: Unknown result type (might be due to invalid IL or missing references) Vector3 val = currentWaypoint.position - ((Component)this).transform.position; directionToWaypoint = ((Vector3)(ref val)).normalized; rotationGoal = Quaternion.LookRotation(directionToWaypoint); ((Component)this).transform.rotation = Quaternion.Slerp(((Component)this).transform.rotation, rotationGoal, rotateSpeed * Time.deltaTime); } } public class Waypoints : MonoBehaviour { [Range(0f, 2f)] [SerializeField] private float gizmoSize = 1f; [SerializeField] private bool canLoop = true; private void OnDrawGizmos() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) foreach (Transform item in ((Component)this).transform) { Gizmos.color = Color.blue; Gizmos.DrawWireSphere(item.position, gizmoSize); } Gizmos.color = Color.red; for (int i = 0; i < ((Component)this).transform.childCount - 1; i++) { Gizmos.DrawLine(((Component)this).transform.GetChild(i).position, ((Component)this).transform.GetChild(i + 1).position); } if (canLoop) { Gizmos.DrawLine(((Component)this).transform.GetChild(((Component)this).transform.childCount - 1).position, ((Component)this).transform.GetChild(0).position); } } public Transform GetNextWaypoint(Transform currentWaypoint) { if ((Object)(object)currentWaypoint == (Object)null) { return ((Component)this).transform.GetChild(0); } if (currentWaypoint.GetSiblingIndex() < ((Component)this).transform.childCount - 1) { return ((Component)this).transform.GetChild(currentWaypoint.GetSiblingIndex() + 1); } if (canLoop) { return ((Component)this).transform.GetChild(0); } return ((Component)this).transform.GetChild(currentWaypoint.GetSiblingIndex()); } } namespace CoreWoodExtras { internal class AddGreenhouse { public static EffectList buildWood; public static EffectList breakWood; public static EffectList hitWood; public static EffectList buildStone; public static EffectList breakStone; public static EffectList hitStone; public static EffectList buildMetal; public static EffectList breakMetal; public static EffectList hitMetal; public static EffectList breakGlass; public static EffectList doorOpen; public static EffectList doorClose; public static EffectList gateOpen; public static EffectList gateClose; public static EffectList chestOpen; public static EffectList chestClose; public static void LoadPieces() { AddFX(); AddCoreWoodGreenhouseDoor(); AddCoreWoodGreenhousePanel(); AddCoreWoodGreenhouseRoof(); AddCoreWoodGreenhouseRoofTop(); AddCoreWoodGreenhouseRoofWallCorner(); AddCoreWoodGreenhouseRoofWallHalf(); AddGreenhouseWorkbench(); AddGreenhouseTable(); AddGreenhousePlantPot(); AddGreenhousePlantPots(); AddGreenhouseSoilBags(); AddGreenhouseShovel(); AddGreenhouseRake(); AddPlanter01(); AddPlanter02(); AddPlanter03(); AddPlanter04(); AddPlanter05(); AddPlanter06(); AddPlanterGlowing(); AddPlanterRosesRed(); AddPlanterRosesYellow(); AddPlanterRosesWhite(); AddPottedPlant01(); AddPottedPlant02(); AddPottedPlant03(); AddPottedPlant04(); AddPottedPlant05(); AddPottedPlant06(); AddIvyWall2x2(); AddHedge(); AddHedgeCorner(); AddHedgeCurved(); AddHedgeArch(); AddGnomeWelcome(); AddGnomeFemale(); AddGnomePots(); AddGnomePalm(); } public static void AddFX() { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00eb: 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_00f8: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Expected O, but got Unknown //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Expected O, but got Unknown //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Expected O, but got Unknown //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Expected O, but got Unknown //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Expected O, but got Unknown //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Expected O, but got Unknown //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Expected O, but got Unknown //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Expected O, but got Unknown //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Expected O, but got Unknown //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Expected O, but got Unknown //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Expected O, but got Unknown //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Expected O, but got Unknown //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Expected O, but got Unknown //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Expected O, but got Unknown //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Expected O, but got Unknown //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Expected O, but got Unknown GameObject prefab = Cache.GetPrefab<GameObject>("sfx_build_hammer_wood"); GameObject prefab2 = Cache.GetPrefab<GameObject>("sfx_wood_break"); GameObject prefab3 = Cache.GetPrefab<GameObject>("sfx_wood_hit"); GameObject prefab4 = Cache.GetPrefab<GameObject>("sfx_build_hammer_stone"); GameObject prefab5 = Cache.GetPrefab<GameObject>("sfx_rock_destroyed"); GameObject prefab6 = Cache.GetPrefab<GameObject>("sfx_rock_hit"); GameObject prefab7 = Cache.GetPrefab<GameObject>("sfx_build_hammer_metal"); GameObject prefab8 = Cache.GetPrefab<GameObject>("sfx_metal_blocked"); GameObject prefab9 = Cache.GetPrefab<GameObject>("sfx_break_glass_mm"); GameObject prefab10 = Cache.GetPrefab<GameObject>("sfx_door_open"); GameObject prefab11 = Cache.GetPrefab<GameObject>("sfx_door_close"); GameObject prefab12 = Cache.GetPrefab<GameObject>("sfx_open_gate_mm"); GameObject prefab13 = Cache.GetPrefab<GameObject>("sfx_close_gate_mm"); GameObject prefab14 = Cache.GetPrefab<GameObject>("sfx_chest_open"); GameObject prefab15 = Cache.GetPrefab<GameObject>("sfx_chest_close"); EffectList val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab } }; buildWood = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab2 } }; breakWood = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab3 } }; hitWood = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab4 } }; buildStone = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab5 } }; breakStone = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab6 } }; hitStone = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab7 } }; buildMetal = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab8 } }; breakMetal = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab8 } }; hitMetal = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab9 } }; breakGlass = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab10 } }; doorOpen = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab11 } }; doorClose = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab12 } }; gateOpen = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab13 } }; gateClose = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab14 } }; chestOpen = val; val = new EffectList(); val.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = prefab15 } }; chestClose = val; } public static void AddCoreWoodGreenhouseDoor() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_greenhouse_door"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "forge"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "RoundLog", Amount = 2, Recover = true }, new RequirementConfig { Item = "Crystal", Amount = 2, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakGlass; component.m_hitEffect = hitWood; Door component2 = val.GetComponent<Door>(); component2.m_openEffects = doorOpen; component2.m_closeEffects = doorClose; PieceManager.Instance.AddPiece(val3); } public static void AddCoreWoodGreenhousePanel() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_greenhouse_panel"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "forge"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "RoundLog", Amount = 2, Recover = true }, new RequirementConfig { Item = "Crystal", Amount = 2, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakGlass; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddCoreWoodGreenhouseRoof() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_roof_greenhouse"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "RoundLog", Amount = 2, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddCoreWoodGreenhouseRoofTop() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_roofTop_greenhouse"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "RoundLog", Amount = 2, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddCoreWoodGreenhouseRoofWallCorner() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_greenhouse_roof_wall_corner"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "forge"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "RoundLog", Amount = 1, Recover = true }, new RequirementConfig { Item = "Crystal", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakGlass; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddCoreWoodGreenhouseRoofWallHalf() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_greenhouse_roof_wall_half"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "forge"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "RoundLog", Amount = 1, Recover = true }, new RequirementConfig { Item = "Crystal", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakGlass; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddGreenhouseWorkbench() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_greenhouse_workbench"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "FineWood", Amount = 10, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddGreenhouseTable() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_greenhouse_table"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Wood", Amount = 10, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddGreenhousePlantPot() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_plant_pot"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_stonecutter"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(val3); } public static void AddGreenhousePlantPots() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_plant_pots"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_stonecutter"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Stone", Amount = 2, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(val3); } public static void AddGreenhouseSoilBags() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_soil_bags"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "piece_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[1] { new RequirementConfig { Item = "Wood", Amount = 2, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddGreenhouseShovel() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_garden_shovel"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "forge"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "Wood", Amount = 1, Recover = true }, new RequirementConfig { Item = "Iron", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddGreenhouseRake() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_garden_rake"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "forge"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "Wood", Amount = 1, Recover = true }, new RequirementConfig { Item = "Iron", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPlanter01() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_planter_01"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_corewood_planter_small", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPlanter02() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_planter_02"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_corewood_planter_small", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPlanter03() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_planter_03"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_corewood_planter_small", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPlanter04() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_planter_04"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_corewood_planter_small", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPlanter05() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_planter_05"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_corewood_planter_small", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPlanter06() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_planter_06"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_corewood_planter_small", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 1, Recover = true } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPlanterGlowing() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_planter_glowing"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_corewood_planter_large", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPlanterRosesRed() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_planter_roses_red"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_corewood_planter_large", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPlanterRosesYellow() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_planter_roses_yellow"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_corewood_planter_large", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPlanterRosesWhite() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_corewood_planter_roses_white"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_corewood_planter_large", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 2, Recover = false } }; CustomPiece val3 = new CustomPiece(val, true, val2); val.GetComponent<Piece>().m_placeEffect = buildWood; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakWood; component.m_hitEffect = hitWood; PieceManager.Instance.AddPiece(val3); } public static void AddPottedPlant01() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_potted_plant_01"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_vase_01", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 1, Recover = false } }; CustomPiece val3 = new CustomPiece(val, false, val2); val.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(val3); } public static void AddPottedPlant02() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_potted_plant_02"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_vase_01", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 1, Recover = false } }; CustomPiece val3 = new CustomPiece(val, false, val2); val.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(val3); } public static void AddPottedPlant03() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown GameObject val = CoreWoodPlugin.cwextras.LoadAsset<GameObject>("mm_potted_plant_03"); PieceConfig val2 = new PieceConfig(); val2.CraftingStation = "mm_corewood_greenhouse_workbench"; val2.PieceTable = "_HammerPieceTable"; val2.Category = "CoreWood-Greenhouse"; val2.Requirements = (RequirementConfig[])(object)new RequirementConfig[2] { new RequirementConfig { Item = "mm_vase_01", Amount = 1, Recover = true }, new RequirementConfig { Item = "mm_mystical_seed", Amount = 1, Recover = false } }; CustomPiece val3 = new CustomPiece(val, false, val2); val.GetComponent<Piece>().m_placeEffect = buildStone; WearNTear component = val.GetComponent<WearNTear>(); component.m_destroyedEffect = breakStone; component.m_hitEffect = hitStone; PieceManager.Instance.AddPiece(val3); } public static void AddPottedPlant04() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown //IL_0042: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result typ